Class 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.
    • 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