我需要过滤相应的我们的CMS的访问权限(基于Drupal的位掩码7 +自定义访问控制机制)Solr的搜索结果。
存在对搜索结果中的Solr QParserPlugin插件滤波基于位运算的整数字段: https://issues.apache.org/jira/browse/SOLR-1913 。
我使用的Solr 3.6.1(+在/var/lib/tomcat6/solr/lib/bitwise_filter_plugin.jar插件)上的tomcat6(Debian系统上)与schema.xml中由drupal的模块search_api_solr和solrconfig.xml中提供在模块发出队列中发现(如延伸在SOLR-1913发出指示)。
Solr的查询...
http://solr:8080/solr/select?qf=t_title&fl=*,score&fq={!bitwise field=is_bitmask op=AND source=1234}*
...失败,并在错误日志中的以下信息:
Sep 27, 2012 8:57:41 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={qf=t_title&fl=*,score&fq={!bitwise+field%3Dis_bitmask+op%3DAND+source%3D1234}} status=500 QTime=15
Sep 27, 2012 8:57:41 AM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
at org.apache.lucene.search.FilteredQuery.hashCode(FilteredQuery.java:268)
at java.util.AbstractList.hashCode(AbstractList.java:542)
at org.apache.solr.search.QueryResultKey.<init>(QueryResultKey.java:49)
at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1084)
at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:375)
at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:394)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:186)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:636)
我可以在错误信息中看到的唯一的事情是,插件是通过调用的Solr。
任何帮助,将不胜感激,谢谢。