Class AppSearchClient
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.AppSearchClient
-
public class AppSearchClient extends Object
Represents a client for the AppSearch APIs. Use the static Builder class to construct an instance of this class.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAppSearchClient.BuilderUsed to build an instance of the AppSearch Client
-
Constructor Summary
Constructors Constructor Description AppSearchClient(String baseUrl, okhttp3.OkHttpClient client)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AppSearchClient.Builderbuilder(String baseUrl)Create a builder with the given baseUrl<T> DocumentsApi<T>documents(Class<T> documentType)Create an instance of the AppSearch Documents APIEnginesApiengines()Creates an instance of the AppSearch Engines APIQuerySuggestionsApiquerySuggestions()Create an instance of the AppSearch QuerySuggestions APISchemaApischemas()Creates an instance of the AppSearch Schema API<T extends ResponseDocument>
SearchApi<T>search(Class<T> resultType)Create an instance of the AppSearch Search APISearchSettingsApisearchSettings()Creates an instance of the AppSearch Search Settings APISourceEnginesApisourceEngines()Creates an instance of the AppSearch Source Engines API
-
-
-
Constructor Detail
-
AppSearchClient
public AppSearchClient(String baseUrl, okhttp3.OkHttpClient client)
-
-
Method Detail
-
builder
public static AppSearchClient.Builder builder(String baseUrl)
Create a builder with the given baseUrl- Parameters:
baseUrl- The Enterprise Search Base URL- Returns:
- The Builder
-
documents
public <T> DocumentsApi<T> documents(Class<T> documentType)
Create an instance of the AppSearch Documents API- Type Parameters:
T- The type of documents contained in the engine- Parameters:
documentType- The class that represents the type of documents that are contained in the engine- Returns:
- A typed DocumentsApi object
-
search
public <T extends ResponseDocument> SearchApi<T> search(Class<T> resultType)
Create an instance of the AppSearch Search API- Type Parameters:
T- The type of ResponseDocument that is represented by the engine's schema- Parameters:
resultType- The class that represents the engine's schema- Returns:
- A typed DocumentsApi object
-
engines
public EnginesApi engines()
Creates an instance of the AppSearch Engines API- Returns:
- The EnginesApi
-
schemas
public SchemaApi schemas()
Creates an instance of the AppSearch Schema API- Returns:
- The SchemaApi
-
searchSettings
public SearchSettingsApi searchSettings()
Creates an instance of the AppSearch Search Settings API- Returns:
- The SearchSettingsApi
-
sourceEngines
public SourceEnginesApi sourceEngines()
Creates an instance of the AppSearch Source Engines API- Returns:
- The SourceEnginesApi
-
querySuggestions
public QuerySuggestionsApi querySuggestions()
Create an instance of the AppSearch QuerySuggestions API- Returns:
- The QuerySuggestionsApi
-
-