本文整理了Java中com.algolia.search.saas.Query.set
方法的一些代码示例,展示了Query.set
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.set
方法的具体详情如下:
包路径:com.algolia.search.saas.Query
类名称:Query
方法名:set
[英]Set a parameter in an untyped fashion. This low-level accessor is intended to access parameters that this client does not yet support.
[中]以非类型化方式设置参数。此低级访问器用于访问此客户端尚不支持的参数。
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* This feature is similar to the distinct just before but instead of
* keeping the best value per value of attributeForDistinct, it allows to
* keep N values.
*
* @param nbHitsToKeep Specify the maximum number of hits to keep for each distinct
* value
*/
public @NonNull
Query setDistinct(Integer nbHitsToKeep) {
return set(KEY_DISTINCT, nbHitsToKeep);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Set the <b>deprecated</b> {@code facetFilters} parameter.
*
* @deprecated Use {@link Query#setFilters(String)} instead.
*/
public @NonNull
Query setFacetFilters(JSONArray filters) {
return set(KEY_FACET_FILTERS, filters);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Change the radius or around latitude/longitude query
*/
public @NonNull
Query setAroundPrecision(Integer precision) {
return set(KEY_AROUND_PRECISION, precision);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Limit the number of facet values returned for each facet.
*/
public @NonNull
Query setMaxFacetHits(Integer n) {
return set(KEY_MAX_FACET_HITS, n);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Specify the minimum number of characters in a query word to accept one
* typo in this word. Defaults to 3.
*/
public @NonNull
Query setMinWordSizefor2Typos(Integer nbChars) {
return set(KEY_MIN_WORD_SIZE_FOR_2_TYPOS, nbChars);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Specify the string that is used as an ellipsis indicator when a snippet
* is truncated (defaults to the empty string).
*/
public @NonNull
Query setSnippetEllipsisText(String snippetEllipsisText) {
return set(KEY_SNIPPET_ELLIPSIS_TEXT, snippetEllipsisText);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* if set, the result hits will contain ranking information in _rankingInfo
* attribute.
*/
public @NonNull
Query setGetRankingInfo(@Nullable Boolean enabled) {
return set(KEY_GET_RANKING_INFO, enabled);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* If set to true, plural won't be considered as a typo (for example
* car/cars will be considered as equals). Defaults to false.
*/
public @NonNull
Query setIgnorePlurals(@Nullable Boolean enabled) {
return set(KEY_IGNORE_PLURALS, enabled);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* @param enabled If set to false, this query will not use synonyms defined in
* configuration. Defaults to true.
*/
public @NonNull
Query setSynonyms(@Nullable Boolean enabled) {
return set(KEY_SYNONYMS, enabled);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Search for entries around the latitude/longitude of user (using IP
* geolocation)
*/
public @NonNull
Query setAroundLatLngViaIP(@Nullable Boolean enabled) {
return set(KEY_AROUND_LAT_LNG_VIA_IP, enabled);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Force faceting to be applied after de-duplication. Please check <a href="https://www.algolia.com/doc/rest-api/search/#facetingafterdistinct">documentation</a> for consequences and limitations
*
* @param enabled if {@code true}, facets will be computed after de-duplication is applied.
* @see <a href="https://www.algolia.com/doc/api-client/android/parameters/#facetingafterdistinct">facetingAfterDistinct's documentation</a>
*/
public @NonNull
Query setFacetingAfterDistinct(@Nullable Boolean enabled) {
return set(KEY_FACETING_AFTER_DISTINCT, enabled);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* @param enabled If set to false, rules processing is disabled: no rule will match the query.
* Defaults to true.
*/
public @NonNull
Query setEnableRules(@Nullable Boolean enabled) {
return set(KEY_ENABLE_RULES, enabled);
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* @param tags Set the analytics tags identifying the query
*/
public @NonNull
Query setAnalyticsTags(String... tags) {
return set(KEY_ANALYTICS_TAGS, buildJSONArray(tags));
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* List of attributes on which you want to disable computation of the {@code exact} ranking criterion (must be a subset of the `searchableAttributes` index setting).
*/
public @NonNull
Query setDisableExactOnAttributes(String... attributes) {
return set(KEY_DISABLE_EXACT_ON_ATTRIBUTES, buildJSONArray(attributes));
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* List of attributes on which you want to disable typo tolerance (must be a subset of the `searchableAttributes` index setting).
*/
public @NonNull
Query setDisableTypoToleranceOnAttributes(String... attributes) {
return set(KEY_DISABLE_TYPO_TOLERANCE_ON_ATTRIBUTES, buildJSONArray(attributes));
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* A list of language codes for which plural won't be considered as a typo (for example
* car/cars will be considered as equals). If empty or null, this disables the feature.
*/
public @NonNull
Query setIgnorePlurals(@Nullable Collection<String> languageISOCodes) {
return set(KEY_IGNORE_PLURALS, new IgnorePlurals(languageISOCodes));
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Select the strategy to adopt when a query does not return any result.
*/
public @NonNull
Query setRemoveWordsIfNoResults(@Nullable RemoveWordsIfNoResults type) {
set(KEY_REMOVE_WORDS_IF_NO_RESULT, type == null ? null : type.toString());
return this;
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Deprecated, use {@link #setAttributesToRetrieve(String...)}
*/
@Deprecated
public @NonNull
Query setAttributesToRetrieve(List<String> attributes) {
return set(KEY_ATTRIBUTES_TO_RETRIEVE, buildJSONArray((String[]) attributes.toArray()));
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* When using {@link #setFacets}, Algolia retrieves a list of matching facet values for each faceted attribute.
* This parameter controls how the facet values are sorted within each faceted attribute.
*
* @param order supported options are `count` (sort by decreasing count) and `alpha` (sort by increasing alphabetical order)
* @return This instance (used to chain calls).
*/
public @NonNull
Query setSortFacetValuesBy(SortFacetValuesBy order) {
return set(KEY_SORT_FACET_VALUES_BY, order.toString());
}
代码示例来源:origin: algolia/algoliasearch-client-android
/**
* Search for entries inside a given area defined by the points of a polygon.
*/
public @NonNull
Query setInsidePolygon(@Nullable LatLng... points) {
set(KEY_INSIDE_POLYGON, points == null ? null : new Polygon(points).toString());
return this;
}
内容来源于网络,如有侵权,请联系作者删除!