I was trying to develop custom update handler for Solr 5.2.1 Version. I am facing this issue:
The type org.apache.lucene.uninverting.UninvertingReader$Type
cannot be resolved. It is indirectly referenced from required .class files
when I import org.apache.solr.schema.IndexSchema.
Java version - java 1.8
JRE Lib -java 1.8
Eclipse - Luna Release (4.4.0)
Code snippet -
import org.apache.solr.common.SolrDocument;
import org.apache.solr.core.SolrCore;
import org.apache.solr.request.SolrQueryRequest;
import org.apache.solr.response.SolrQueryResponse;
import org.apache.solr.schema.DateValueFieldType;
import org.apache.solr.schema.IndexSchema;
import org.apache.solr.update.processor.UpdateRequestProcessor;
import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
import org.apache.solr.util.plugin.SolrCoreAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.apache.solr.update.AddUpdateCommand;
public class DocumentsFilterProcessorFactory extends UpdateRequestProcessorFactory
implements SolrCoreAware, DateValueFieldType {
public final static Logger log = LoggerFactory.getLogger(DocumentsFilterProcessorFactory.class);
@Override
public UpdateRequestProcessor getInstance(SolrQueryRequest request,
SolrQueryResponse response, UpdateRequestProcessor nextProcessor) {
// TODO Auto-generated method stub
return new DocumentsFilterProcessor(request, response, this, nextProcessor);
return null;
}
@Override
public void inform(SolrCore core) {
}
}
class DocumentsFilterProcessor extends UpdateRequestProcessor {
IndexSchema schema=null;
public DocumentsFilterProcessor(SolrQueryRequest req, SolrQueryResponse rsp,
DocumentsFilterProcessorFactory factory, UpdateRequestProcessor next) {
super(next);
}
}
It is something related to Eclipse. I had the same issue using 'Eclipse mars 1' and after changing to 'Eclipse mars 2' the issue is resolved.