You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am trying to use SolrTextTagger with EmbeddedSolr 6.2.1. I have configured the index schema in the same way as suggested in the example (add the request handler, copy fields, etc.).
Here is the code I am trying to execute:
public void tagDocument(String text) {
ModifiableSolrParams params = new ModifiableSolrParams();
params.add("field", "name_tag");
QueryRequest request = new SolrTaggerRequest(params, text);
request.setPath("/tag");
try {
QueryResponse response = request.process(getSolrClient());
for (SolrDocument doc: response.getResults()){
logger.info("title: {}, name_tag: {}", doc.get("title"), doc.get("name_tag"));
}
} catch (SolrServerException ex) {
logger.error("SolrServerException: fail to execute term query", ex);
} catch (IOException ex) {
logger.error("IOException: fail to execute term query", ex);
}
}
When I execute the code I have this error:
java.lang.NoSuchMethodError: org.apache.solr.search.SolrIndexSearcher.getSlowAtomicReader()Lorg/apache/lucene/index/LeafReader;
at org.opensextant.solrtexttagger.TaggerRequestHandler.handleRequestBody(TaggerRequestHandler.java:167)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2089)
at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:178)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:166)
at com.engine.artes.resources.SolrTextTagger.tagDocument(SolrTextTagger.java:83)
Can you please help me fix the problem ?
The text was updated successfully, but these errors were encountered:
Hi,
I am trying to use SolrTextTagger with EmbeddedSolr 6.2.1. I have configured the index schema in the same way as suggested in the example (add the request handler, copy fields, etc.).
Here is the code I am trying to execute:
public void tagDocument(String text) {
ModifiableSolrParams params = new ModifiableSolrParams();
params.add("field", "name_tag");
QueryRequest request = new SolrTaggerRequest(params, text);
request.setPath("/tag");
When I execute the code I have this error:
java.lang.NoSuchMethodError: org.apache.solr.search.SolrIndexSearcher.getSlowAtomicReader()Lorg/apache/lucene/index/LeafReader;
at org.opensextant.solrtexttagger.TaggerRequestHandler.handleRequestBody(TaggerRequestHandler.java:167)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:2089)
at org.apache.solr.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:178)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:149)
at org.apache.solr.client.solrj.SolrRequest.process(SolrRequest.java:166)
at com.engine.artes.resources.SolrTextTagger.tagDocument(SolrTextTagger.java:83)
Can you please help me fix the problem ?
The text was updated successfully, but these errors were encountered: