Package com.acumenvelocity.ath.solr
Class Solr
- java.lang.Object
-
- com.acumenvelocity.ath.solr.Solr
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class Solr extends Object implements Closeable
-
-
Field Summary
Fields Modifier and Type Field Description static StringFIELDSstatic StringINCLUDE_SCOREstatic StringREQUEST_HANDLERstatic StringROWS
-
Constructor Summary
Constructors Constructor Description Solr()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcommit(String coreName)longcreateMany(String coreName, Iterator<org.apache.solr.common.SolrInputDocument> solrDocs)longcreateMany(String coreName, List<Map<String,Object>> docs)voidcreateOne(String coreName, Map<String,Object> doc)voiddeleteById(String coreName, String id)voiddeleteByIds(String coreName, List<String> ids)voiddeleteByQuery(String coreName, String query)org.apache.solr.client.solrj.SolrClientgetClient()<Response> ResponsegetMany(String coreName, String query, Map<String,Object> queryParams, Class<Response> responseClass)voidping(String coreName)
-
-
-
Field Detail
-
REQUEST_HANDLER
public static final String REQUEST_HANDLER
- See Also:
- Constant Field Values
-
INCLUDE_SCORE
public static final String INCLUDE_SCORE
- See Also:
- Constant Field Values
-
ROWS
public static final String ROWS
- See Also:
- Constant Field Values
-
FIELDS
public static final String FIELDS
- See Also:
- Constant Field Values
-
-
Method Detail
-
createOne
public void createOne(String coreName, Map<String,Object> doc) throws Exception
- Throws:
Exception
-
createMany
public long createMany(String coreName, List<Map<String,Object>> docs) throws Exception
- Throws:
Exception
-
deleteByIds
public void deleteByIds(String coreName, List<String> ids) throws Exception
- Throws:
Exception
-
deleteByQuery
public void deleteByQuery(String coreName, String query) throws Exception
- Throws:
Exception
-
getMany
public <Response> Response getMany(String coreName, String query, Map<String,Object> queryParams, Class<Response> responseClass) throws Exception
- Throws:
Exception
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
createMany
public long createMany(String coreName, Iterator<org.apache.solr.common.SolrInputDocument> solrDocs) throws Exception
- Throws:
Exception
-
getClient
public org.apache.solr.client.solrj.SolrClient getClient()
-
-