[ 
https://issues.apache.org/jira/browse/SOLR-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12988573#action_12988573
 ] 

Arnaud edited comment on SOLR-1913 at 1/30/11 7:43 AM:
-------------------------------------------------------

Hi Israel,

I've just tried your plugin with the latest nightly build of solr.

I got the foolowing exception:

GRAVE: java.lang.AbstractMethodError: 
org.apache.lucene.search.Filter.getDocIdSet(Lorg/apache/lucene/index/IndexReader$AtomicReaderContext;)Lorg/apache/lucene/search/DocIdSet;
        at 
org.apache.lucene.search.FilteredQuery$1.scorer(FilteredQuery.java:120)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:519)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:327)
        at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1190)
        at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1086)
        at 
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:335)
        at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:426)
        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:231)
        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1296)
        at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
        at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

Here is an part pf scema.xml:

...
  <field name="id" type="string" indexed="true" stored="true" required="true" 
/> 
   <field name="grp" type="int" indexed="true" stored="true" required="true" /> 
   <field name="mid" type="long" indexed="true" stored="true" required="true" 
/> 
...

and here is my request 
http://localhost:8983/solr/select/?q={!bitwise field=grp op=AND source=1}*

when I use
http://localhost:8983/solr/select/?q=grp:1&fl=id
I got the correct answer (12 results):

Any idea of the source of the problem? and how to solve it?

Thank you very much

      was (Author: abalgo):
    Hi,

I've just tried your plugin with the latest nightly build of solr.

I got the foolowing exception:

GRAVE: java.lang.AbstractMethodError: 
org.apache.lucene.search.Filter.getDocIdSet(Lorg/apache/lucene/index/IndexReader$AtomicReaderContext;)Lorg/apache/lucene/search/DocIdSet;
        at 
org.apache.lucene.search.FilteredQuery$1.scorer(FilteredQuery.java:120)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:519)
        at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:327)
        at 
org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1190)
        at 
org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1086)
        at 
org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:335)
        at 
org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:426)
        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:231)
        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1296)
        at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
        at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
        at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
        at 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
        at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)


Any idea to solve the problem?
  
> QParserPlugin plugin for Search Results Filtering Based on Bitwise Operations 
> on Integer Fields
> -----------------------------------------------------------------------------------------------
>
>                 Key: SOLR-1913
>                 URL: https://issues.apache.org/jira/browse/SOLR-1913
>             Project: Solr
>          Issue Type: New Feature
>          Components: search
>            Reporter: Israel Ekpo
>             Fix For: Next
>
>         Attachments: bitwise_filter_plugin.jar, SOLR-1913.bitwise.tar.gz
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> BitwiseQueryParserPlugin is a org.apache.solr.search.QParserPlugin that 
> allows 
> users to filter the documents returned from a query
> by performing bitwise operations between a particular integer field in the 
> index
> and the specified value.
> This Solr plugin is based on the BitwiseFilter in LUCENE-2460
> See https://issues.apache.org/jira/browse/LUCENE-2460 for more details
> This is the syntax for searching in Solr:
> http://localhost:8983/path/to/solr/select/?q={!bitwise field=fieldname 
> op=OPERATION_NAME source=sourcevalue negate=boolean}remainder of query
> Example :
> http://localhost:8983/solr/bitwise/select/?q={!bitwise field=user_permissions 
> op=AND source=3 negate=true}state:FL
> The negate parameter is optional
> The field parameter is the name of the integer field
> The op parameter is the name of the operation; one of {AND, OR, XOR}
> The source parameter is the specified integer value
> The negate parameter is a boolean indicating whether or not to negate the 
> results of the bitwise operation
> To test out this plugin, simply copy the jar file containing the plugin 
> classes into your $SOLR_HOME/lib directory and then
> add the following to your solrconfig.xml file after the dismax request 
> handler:
> <queryParser name="bitwise" 
> class="org.apache.solr.bitwise.BitwiseQueryParserPlugin" basedOn="dismax" />
> Restart your servlet container.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to