Interface SolrRestManagerAPIService
- All Known Implementing Classes:
SolrRestManagerAPIServiceImpl
public interface SolrRestManagerAPIService
This service is responsible with interacting with Solr's RestManager API.
- Author:
- Nick Crum ncrum
-
Method Summary
Modifier and TypeMethodDescriptiondeleteResource(org.apache.solr.client.solrj.SolrClient solrClient, String resourceName, String language, String term) Deletes the item by the given term from the resource with the given resource name and language.fetchResource(org.apache.solr.client.solrj.SolrClient solrClient, String resourceName, String language) Fetches the resource for the given resource name and language using the providedSolrClient.putResource(org.apache.solr.client.solrj.SolrClient solrClient, String resourceName, String language, Object body) Adds a new item to the resource with the given resource name and language using the providedSolrClient.
-
Method Details
-
fetchResource
RestManagerResponse fetchResource(org.apache.solr.client.solrj.SolrClient solrClient, String resourceName, String language) throws IOException, org.apache.solr.client.solrj.SolrServerException Fetches the resource for the given resource name and language using the providedSolrClient.- Parameters:
solrClient- the SolrClientresourceName- the name of the resource, e.g. "synonyms"language- the language or version of the resource, e.g. "en"- Returns:
- the RestManagerResponse
- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
putResource
RestManagerResponse putResource(org.apache.solr.client.solrj.SolrClient solrClient, String resourceName, String language, Object body) throws IOException, org.apache.solr.client.solrj.SolrServerException Adds a new item to the resource with the given resource name and language using the providedSolrClient. The object provided is typically a Map or a List depending on what the resource requires.- Parameters:
solrClient- the SolrClientresourceName- the name of the resource, e.g. "synonyms"language- the language or version of the resource, e.g. "en"body- the request body- Returns:
- the RestManageResponse
- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-
deleteResource
RestManagerResponse deleteResource(org.apache.solr.client.solrj.SolrClient solrClient, String resourceName, String language, String term) throws IOException, org.apache.solr.client.solrj.SolrServerException Deletes the item by the given term from the resource with the given resource name and language.- Parameters:
solrClient- the SolrClientresourceName- the name of the resource, e.g. "synonyms"language- the language or version of the resource, e.g. "en"term- the key/term of the item- Returns:
- the RestManagerResponse
- Throws:
IOExceptionorg.apache.solr.client.solrj.SolrServerException
-