Interface DocumentsApi<T>

  • All Known Implementing Classes:
    DocumentsApiImpl

    public interface DocumentsApi<T>
    • Method Detail

      • index

        IndexResponse index​(String engineName,
                            List<T> documents)
        Create or Update document(s) in the index
        Parameters:
        engineName - The engine name
        documents - The documents to insert or update
        Returns:
        The index response
      • getDocuments

        List<T> getDocuments​(String engineName,
                             List<String> ids)
        Retrieves one or more documents by id. All field values are returned in string format
        Parameters:
        engineName - the engine name
        ids - the document ids
        Returns:
        a list of documents matching the given ids. Documents not found will be null entries
      • delete

        DeleteResponse delete​(String engineName,
                              List<String> ids)
        Delete the documents with the given ids
        Parameters:
        engineName - The engine name
        ids - A list of document ids to delete
        Returns:
        The delete response
      • listDocuments

        ListResponse<T> listDocuments​(String engineName,
                                      Page page)
        Lists documents in the given engine
        Parameters:
        engineName - The name of the engine
        page - A page object
        Returns:
        A list of documents