我正在尝试为 Solr 5.2.1 版本开发自定义更新处理程序。我正面临这个问题:
The type org.apache.lucene.uninverting.UninvertingReader$Type
cannot be resolved. It is indirectly referenced from required .class files
导入org.apache.solr.schema.IndexSchema.
Java版 - java 1.8
JRE Lib -java 1.8
日蚀 - Luna Release (4.4.0)
代码段 -
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);
}
}
答案 0 :(得分:0)
这与Eclipse有关。使用' Eclipse mars 1'我有同样的问题。在改为Eclipse火星2'之后这个问题已经解决了。