Interface DocumentsApi<T>
-
- Type Parameters:
T- The type of document(s) to store in the engine
public interface DocumentsApi<T>Represents the Documents API in AppSearch
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DeleteResponsedelete(String engineName, List<String> ids)Delete the documents with the given idsList<T>getDocuments(String engineName, List<String> ids)Retrieves one or more documents by id.IndexResponseindex(String engineName, List<T> documents)Create or Update document(s) in the indexListResponse<T>listDocuments(String engineName, Page page)Lists documents in the given engine
-
-
-
Method Detail
-
index
IndexResponse index(String engineName, List<T> documents)
Create or Update document(s) in the index- Parameters:
engineName- The engine namedocuments- 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 nameids- 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 nameids- 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 enginepage- A page object- Returns:
- A list of documents
-
-