From 6d849d18a861b1d0cb35c85b2ffab79305c14277 Mon Sep 17 00:00:00 2001 From: Thomas Raffray Date: Fri, 24 Jan 2025 11:39:07 +0100 Subject: [PATCH] feat(kotlin): searchWithOptionalFilters --- .../guides/search/searchWithOptionalFilters.mustache | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 templates/kotlin/guides/search/searchWithOptionalFilters.mustache diff --git a/templates/kotlin/guides/search/searchWithOptionalFilters.mustache b/templates/kotlin/guides/search/searchWithOptionalFilters.mustache new file mode 100644 index 0000000000..82c521991e --- /dev/null +++ b/templates/kotlin/guides/search/searchWithOptionalFilters.mustache @@ -0,0 +1,11 @@ +{{> snippets/import}} +import com.algolia.client.model.search.* + +suspend fun searchWithOptionalFilters() { + {{> snippets/init}} + + val optionalFilters = reduceLabelsToFilters(labels) + val searchParams = SearchParamsObject(query = "", optionalFilters = optionalFilters) + + client.{{#dynamicSnippet}}searchWithSearchParams{{/dynamicSnippet}} +} \ No newline at end of file