public class DualSearchService extends Object implements SearchService
SearchService decorator that uses two different search services: one for reads and another one for writes.
The read service is required. If no write service is provided and any type of update or commit is attempted, the
service silently fails with a warning.| Modifier and Type | Field and Description |
|---|---|
static String |
NO_WRITE_SERVICE_PROVIDED_MSG |
| Constructor and Description |
|---|
DualSearchService() |
| Modifier and Type | Method and Description |
|---|---|
String |
commit() |
String |
commit(String indexId) |
String |
delete(String site,
String id) |
String |
delete(String indexId,
String site,
String id) |
Map<String,Object> |
search(Query query) |
Map<String,Object> |
search(String indexId,
Query query) |
void |
setReadService(SearchService readService) |
void |
setWriteService(SearchService writeService) |
String |
update(String site,
String id,
String xml,
boolean ignoreRootInFieldNames) |
String |
update(String indexId,
String site,
String id,
String xml,
boolean ignoreRootInFieldNames) |
String |
updateDocument(String site,
String id,
File document)
Deprecated.
|
String |
updateDocument(String site,
String id,
File document,
Map<String,String> additionalFields)
Deprecated.
|
String |
updateFile(String site,
String id,
org.craftercms.core.service.Content content) |
String |
updateFile(String site,
String id,
org.craftercms.core.service.Content content,
Map<String,List<String>> additionalFields) |
String |
updateFile(String site,
String id,
File file) |
String |
updateFile(String site,
String id,
File file,
Map<String,List<String>> additionalFields) |
String |
updateFile(String indexId,
String site,
String id,
org.craftercms.core.service.Content content) |
String |
updateFile(String indexId,
String site,
String id,
org.craftercms.core.service.Content content,
Map<String,List<String>> additionalFields) |
String |
updateFile(String indexId,
String site,
String id,
File file) |
String |
updateFile(String indexId,
String site,
String id,
File file,
Map<String,List<String>> additionalFields) |
public static final String NO_WRITE_SERVICE_PROVIDED_MSG
public void setReadService(SearchService readService)
public void setWriteService(SearchService writeService)
public Map<String,Object> search(Query query) throws SearchException
search in interface SearchServiceSearchExceptionpublic Map<String,Object> search(String indexId, Query query) throws SearchException
search in interface SearchServiceSearchExceptionpublic String update(String site, String id, String xml, boolean ignoreRootInFieldNames) throws SearchException
update in interface SearchServiceSearchExceptionpublic String update(String indexId, String site, String id, String xml, boolean ignoreRootInFieldNames) throws SearchException
update in interface SearchServiceSearchExceptionpublic String delete(String site, String id) throws SearchException
delete in interface SearchServiceSearchExceptionpublic String delete(String indexId, String site, String id) throws SearchException
delete in interface SearchServiceSearchExceptionpublic String commit() throws SearchException
commit in interface SearchServiceSearchExceptionpublic String commit(String indexId) throws SearchException
commit in interface SearchServiceSearchException@Deprecated public String updateDocument(String site, String id, File document) throws SearchException
updateDocument in interface SearchServiceSearchException@Deprecated public String updateDocument(String site, String id, File document, Map<String,String> additionalFields) throws SearchException
updateDocument in interface SearchServiceSearchExceptionpublic String updateFile(String site, String id, File file) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String indexId, String site, String id, File file) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String site, String id, File file, Map<String,List<String>> additionalFields) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String indexId, String site, String id, File file, Map<String,List<String>> additionalFields) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String site, String id, org.craftercms.core.service.Content content) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String indexId, String site, String id, org.craftercms.core.service.Content content) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String site, String id, org.craftercms.core.service.Content content, Map<String,List<String>> additionalFields) throws SearchException
updateFile in interface SearchServiceSearchExceptionpublic String updateFile(String indexId, String site, String id, org.craftercms.core.service.Content content, Map<String,List<String>> additionalFields) throws SearchException
updateFile in interface SearchServiceSearchExceptionCopyright © 2018 CrafterCMS. All rights reserved.