Package com.algolia.search
Class DefaultSearchClient
- java.lang.Object
-
- com.algolia.search.DefaultSearchClient
-
public class DefaultSearchClient extends Object
Algolia's REST search client that wraps an instance of the transporter which wraps the HttpClient This client allows to build typed requests and read typed responses. Requests are made under the Algolia's retry-strategy. This client is intended to be reused and it's thread-safe.- See Also:
- Algolia.com
-
-
Constructor Summary
Constructors Constructor Description DefaultSearchClient()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SearchClientcreate(SearchConfig config)Creates a defaultDefaultSearchClientwith the givenSearchConfig.static SearchClientcreate(String applicationID, String apiKey)Creates aDefaultSearchClientwith the given credentials The default HttpClient implementation isApacheHttpRequester
-
-
-
Method Detail
-
create
public static SearchClient create(@Nonnull String applicationID, @Nonnull String apiKey)
Creates aDefaultSearchClientwith the given credentials The default HttpClient implementation isApacheHttpRequester- Parameters:
applicationID- The Algolia Application IDapiKey- The Algolia API Key- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
create
public static SearchClient create(@Nonnull SearchConfig config)
Creates a defaultDefaultSearchClientwith the givenSearchConfig. The default HttpClient implementation isApacheHttpRequester- Parameters:
config- The configuration allows you to advanced configuration of the clients such as batch size or custom hosts and timeout.- Throws:
NullPointerException- If one of the following ApplicationID/ApiKey/Config is nullIllegalArgumentException- If the ApplicationID or the APIKey are empty
-
-