public interface ElasticsearchService extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
void |
delete(String indexName,
String siteId,
String docId)
Performs a delete for the given document
|
void |
index(String indexName,
String siteId,
String docId,
Map<String,Object> doc) |
default void |
index(String indexName,
String siteId,
String docId,
String xml)
Performs an index for the given xml file
|
void |
index(String indexName,
String siteId,
String docId,
String xml,
Map<String,Object> additionalFields)
Performs an index for the given xml file
|
void |
indexBinary(String indexName,
String siteName,
String path,
Map<String,Object> additionalFields,
org.craftercms.core.service.Content content)
Performs an index for the given binary file
|
void |
indexBinary(String indexName,
String siteName,
String path,
Map<String,Object> additionalFields,
org.springframework.core.io.Resource resource) |
void |
refresh(String indexName)
Performs a refresh for a given index
|
List<String> |
searchField(String indexName,
String field,
org.elasticsearch.index.query.QueryBuilder queryBuilder)
Performs a search for a specific field
|
Map<String,Object> |
searchId(String indexName,
String docId) |
closeList<String> searchField(String indexName, String field, org.elasticsearch.index.query.QueryBuilder queryBuilder) throws ElasticsearchException
indexName - the name of the indexfield - the name of the fieldqueryBuilder - the filters to applyElasticsearchException - if there is any error during the operationdefault void index(String indexName, String siteId, String docId, String xml) throws ElasticsearchException
indexName - the name of the indexsiteId - the name of the sitedocId - the id of the documentxml - the content of the documentElasticsearchException - if there is any error during the operationvoid index(String indexName, String siteId, String docId, String xml, Map<String,Object> additionalFields) throws ElasticsearchException
indexName - the name of the indexsiteId - the name of the sitedocId - the id of the documentxml - the content of the documentadditionalFields - additional fields to indexElasticsearchException - if there is any error during the operationvoid indexBinary(String indexName, String siteName, String path, Map<String,Object> additionalFields, org.craftercms.core.service.Content content) throws ElasticsearchException
indexName - the name of the indexsiteName - the name of the sitepath - the path of the documentadditionalFields - the additional fields to indexcontent - the content of the documentElasticsearchException - if there is any error during the operationvoid indexBinary(String indexName, String siteName, String path, Map<String,Object> additionalFields, org.springframework.core.io.Resource resource) throws ElasticsearchException
ElasticsearchExceptionvoid delete(String indexName, String siteId, String docId) throws ElasticsearchException
indexName - the name of the indexsiteId - the id of the sitedocId - the id of the documentElasticsearchException - if there is any error during the operationvoid refresh(String indexName) throws ElasticsearchException
indexName - the name of the indexElasticsearchException - if there is any error during the operationCopyright © 2023 CrafterCMS. All rights reserved.