Skip to content
This repository was archived by the owner on Jan 31, 2022. It is now read-only.

Commit 13ab4a6

Browse files
committed
[fix] Add async aliases to searchForFacetValues
1 parent f6fe596 commit 13ab4a6

File tree

1 file changed

+26
-1
lines changed
  • algoliasearch/src/main/java/com/algolia/search/saas

1 file changed

+26
-1
lines changed

algoliasearch/src/main/java/com/algolia/search/saas/Index.java

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,19 @@ protected Request multipleQueriesAsync(@NonNull List<Query> queries, @NonNull Co
182182
}
183183

184184
/**
185-
* Search for some text in a facet values.
185+
* Search (asynchronously) for some text in a facet values.
186+
*
187+
* @param facetName The name of the facet to search. It must have been declared in the index's `attributesForFaceting` setting with the `searchable()` modifier.
188+
* @param text The text to search for in the facet's values.
189+
* @param handler A Completion handler that will be notified of the request's outcome.
190+
* @return A cancellable request.
191+
*/
192+
public Request searchForFacetValuesAsync(@NonNull String facetName, @NonNull String text, @NonNull final CompletionHandler handler) throws AlgoliaException {
193+
return searchForFacetValues(facetName, text, null, handler);
194+
}
195+
196+
/**
197+
* Search (asynchronously) for some text in a facet values.
186198
*
187199
* @param facetName The name of the facet to search. It must have been declared in the index's `attributesForFaceting` setting with the `searchable()` modifier.
188200
* @param text The text to search for in the facet's values.
@@ -202,6 +214,19 @@ public Request searchForFacetValues(@NonNull String facetName, @NonNull String t
202214
* @param handler A Completion handler that will be notified of the request's outcome.
203215
* @return A cancellable request.
204216
*/
217+
public Request searchForFacetValuesAsync(@NonNull String facetName, @NonNull String facetText, @Nullable Query query, @NonNull final CompletionHandler handler) throws AlgoliaException {
218+
return searchForFacetValues(facetName, facetText, query, handler);
219+
}
220+
221+
/**
222+
* Search (asynchronously) for some text in a facet values, optionally restricting the returned values to those contained in objects matching other (regular) search criteria.
223+
*
224+
* @param facetName The name of the facet to search. It must have been declared in the index's `attributesForFaceting` setting with the `searchable()` modifier.
225+
* @param facetText The text to search for in the facet's values.
226+
* @param query An optional query to take extra search parameters into account. There parameters apply to index objects like in a regular search query. Only facet values contained in the matched objects will be returned
227+
* @param handler A Completion handler that will be notified of the request's outcome.
228+
* @return A cancellable request.
229+
*/
205230
public Request searchForFacetValues(@NonNull String facetName, @NonNull String facetText, @Nullable Query query, @NonNull final CompletionHandler handler) throws AlgoliaException {
206231
try {
207232
final String path = "/1/indexes/" + getEncodedIndexName() + "/facets/" + URLEncoder.encode(facetName, "UTF-8") + "/query";

0 commit comments

Comments
 (0)