X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Faai%2Fsa%2Fsearchdbabstraction%2Felasticsearch%2Fdao%2FDocumentStoreInterface.java;h=a9d5678b634809f2efec131670f5975aff14a31c;hb=ce701746049abfd94a87b46e43f296faf32d6213;hp=a3a8e8e4cd50389a7f99abe5272e1cf6e852518c;hpb=06d31abe3065205c87447687ad87c05e602c97d7;p=aai%2Fsearch-data-service.git diff --git a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java index a3a8e8e..a9d5678 100644 --- a/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java +++ b/src/main/java/org/onap/aai/sa/searchdbabstraction/elasticsearch/dao/DocumentStoreInterface.java @@ -20,6 +20,7 @@ */ package org.onap.aai.sa.searchdbabstraction.elasticsearch.dao; + import org.onap.aai.sa.rest.BulkRequest; import org.onap.aai.sa.searchdbabstraction.elasticsearch.exception.DocumentStoreOperationException; import org.onap.aai.sa.searchdbabstraction.entity.DocumentOperationResult; @@ -27,6 +28,7 @@ import org.onap.aai.sa.searchdbabstraction.entity.OperationResult; import org.onap.aai.sa.searchdbabstraction.entity.SearchOperationResult; import org.onap.aai.sa.rest.DocumentSchema; + public interface DocumentStoreInterface { public OperationResult createIndex(String index, DocumentSchema documentSchema); @@ -35,11 +37,15 @@ public interface DocumentStoreInterface { public OperationResult deleteIndex(String indexName) throws DocumentStoreOperationException; - public DocumentOperationResult createDocument(String indexName, DocumentStoreDataEntity document, - boolean allowImplicitIndexCreation) throws DocumentStoreOperationException; + public DocumentOperationResult createDocument(String indexName, + DocumentStoreDataEntity document, + boolean allowImplicitIndexCreation) throws DocumentStoreOperationException; - public DocumentOperationResult updateDocument(String indexName, DocumentStoreDataEntity document, - boolean allowImplicitIndexCreation) throws DocumentStoreOperationException; + public DocumentOperationResult updateDocument(String indexName, + DocumentStoreDataEntity document, + boolean allowImplicitIndexCreation) throws DocumentStoreOperationException; + + public SearchOperationResult suggestionQueryWithPayload(String indexName, String query) throws DocumentStoreOperationException; public DocumentOperationResult deleteDocument(String indexName, DocumentStoreDataEntity document) throws DocumentStoreOperationException; @@ -53,14 +59,14 @@ public interface DocumentStoreInterface { public SearchOperationResult searchWithPayload(String indexName, String query) throws DocumentStoreOperationException; - public SearchOperationResult suggestionQueryWithPayload(String indexName, String query) - throws DocumentStoreOperationException; /** - * Forwards a set of operations to the document store as a single, bulk request. + * Forwards a set of operations to the document store as a single, bulk + * request. * - * @param anIndex - The index to apply the operations to. - * @param operations - A java object containing the set of operations to be performed. + * @param anIndex - The index to apply the operations to. + * @param operations - A java object containing the set of operations to + * be performed. * @return - An operation result. * @throws DocumentStoreOperationException */