THIS SDK ISDEPRECATED.

We rolled out a new and better SDK for you.

Batch search

Allow your users to process synchronous batch search calls with the Batch Search service integrated. When the service receives a request, it will respond as soon as the batch items are calculated and there will be no possibility to retrieve the results later on.

Supported types of requests

Different types of requests can be mixed in one batch request. The information about the limit of queries, request processing time, and other details are described in the Batch Search service documentation. An error in one of the batch requests causes the whole batch to fail.

Sample use case: You want to simultaneously search for different categories within different locations.

Use the following code to try this in your app:

1//Using batch, it is possible to execute different search types:
2//fuzzy, geometry or reverse geocoding. The order of responses
3//is the same as the order in which the queries are added.
4BatchSearchQueryBuilder batchQuery = new BatchSearchQueryBuilder()
5batchQuery.withFuzzySearchQuery(createAmsterdamQuery(category));
6batchQuery.withFuzzySearchQuery(createHaarlemQuery(category));
7batchQuery.withGeometrySearchQuery(createHoofddropQuery(category));
8
9final SearchApi searchApi = OnlineSearchApi.create(context, BuildConfig.SEARCH_API_KEY);
10searchApi.batchSearch(batchQuery.build(), batchSearchResultListener);
1//Using batch, it is possible to execute different search types:
2//fuzzy, geometry or reverse geocoding. The order of responses
3//is the same as the order in which the queries are added.
4val batchQuery = BatchSearchQueryBuilder()
5 .withFuzzySearchQuery(createAmsterdamQuery(category))
6 .withFuzzySearchQuery(createHaarlemQuery(category))
7 .withGeometrySearchQuery(createHoofddropQuery(category))
8 .build()
9
10 searchApi.batchSearch(batchSearchQuery)

Sample views utilizing data retrieved using the Batch Search service:

image

Search results for different locations