public class SolrSearchService extends Object implements SearchService
SearchService using Solr as the underlying search engine.| Constructor and Description |
|---|
SolrSearchService() |
| Modifier and Type | Method and Description |
|---|---|
String |
commit() |
String |
delete(String site,
String id) |
Map<String,Object> |
search(Query query) |
void |
setSolrDocumentBuilder(SolrDocumentBuilder solrDocumentBuilder)
Sets the Solr document builder, to build Solr documents from generic XML documents.
|
void |
setSolrServer(org.apache.solr.client.solrj.SolrServer solrServer)
Sets the endpoint to the Solr server.
|
protected Map<String,Object> |
toMap(org.apache.solr.common.util.NamedList<Object> namedList) |
protected Object |
toSerializableValue(Object namedListValue) |
protected org.apache.solr.common.params.SolrParams |
toSolrQuery(QueryParams queryParams) |
String |
update(String site,
String id,
String xml,
boolean ignoreRootInFieldNames) |
String |
updateDocument(String site,
String id,
File document) |
String |
updateDocument(String site,
String id,
File document,
String documentXmlDescriptor) |
public void setSolrServer(org.apache.solr.client.solrj.SolrServer solrServer)
public void setSolrDocumentBuilder(SolrDocumentBuilder solrDocumentBuilder)
public Map<String,Object> search(Query query)
search in interface SearchServicepublic String update(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 commit() throws SearchException
commit in interface SearchServiceSearchExceptionprotected org.apache.solr.common.params.SolrParams toSolrQuery(QueryParams queryParams)
public String updateDocument(String site, String id, File document) throws SearchException
updateDocument in interface SearchServiceSearchExceptionpublic String updateDocument(String site, String id, File document, String documentXmlDescriptor) throws SearchException
updateDocument in interface SearchServiceSearchExceptionCopyright © 2013 CrafterCMS. All Rights Reserved.