You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Israel Ekpo (JIRA)" <ji...@apache.org> on 2010/05/14 04:01:42 UTC
[jira] Created: (SOLR-1913) QParserPlugin plugin for Search Results
Filtering Based on Bitwise Operations on Integer Fields
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: 1.5, 1.6, 3.1, 4.0, 1.4
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Commented: (SOLR-1913) QParserPlugin plugin for Search
Results Filtering Based on Bitwise Operations on Integer Fields
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867512#action_12867512 ]
Yonik Seeley commented on SOLR-1913:
------------------------------------
Hi Israel, interesting stuff!
There's always many different ways to approach... but I had previously planned to add these functions (and,or,not,xor) to the function query suit. We'd also need something to filter results (since function queries normally return a value for every document).
So maybe something like
{code}
fq={!func}filter(and(field1,xor(0xdeadbeef,field3)))
or
fq={!funcfilter}and(field1,xor(0xdeadbeef,field3))
{code}
> 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: 1.4, 1.5, 1.6, 3.1, 4.0
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] Updated: (SOLR-1913) QParserPlugin plugin for Search
Results Filtering Based on Bitwise Operations on Integer Fields
Posted by Israel Ekpo <is...@gmail.com>.
Hi Pradeep,
There are a couple of uses cases I can think of in my own applications.
Also, inquiries like these made me believe there are also others that may
have similar needs:
http://lucene.472066.n3.nabble.com/bitwise-comparer-td485697.html
http://lucene.472066.n3.nabble.com/Query-with-bitwise-operation-td495193.html
http://lucene.472066.n3.nabble.com/Solr-and-bitwise-comparaison-td504367.html
http://lucene.472066.n3.nabble.com/Best-way-to-handle-bitfields-in-solr-td473621.html
I hope that answers your question.
On Sat, May 15, 2010 at 3:50 AM, Pradeep Pujari <Pr...@rocketmail.com>wrote:
> Hi Israel,
>
> What would be the business application of this?
>
> Thanks,
> Pradeep.
>
> --- On Thu, 5/13/10, Israel Ekpo (JIRA) <ji...@apache.org> wrote:
>
> > From: Israel Ekpo (JIRA) <ji...@apache.org>
> > Subject: [jira] Updated: (SOLR-1913) QParserPlugin plugin for Search
> Results Filtering Based on Bitwise Operations on Integer Fields
> > To: dev@lucene.apache.org
> > Date: Thursday, May 13, 2010, 7:08 PM
> >
> > [
> https://issues.apache.org/jira/browse/SOLR-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> > ]
> >
> > Israel Ekpo updated SOLR-1913:
> > ------------------------------
> >
> > Attachment: SOLR-1913.bitwise.tar.gz
> >
> > bitwise_filter_plugin.jar
> >
> > Attaching JAR file containing the QParserPlugin
> >
> > 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.
> >
> > > 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: 1.4, 1.5, 1.6, 3.1, 4.0
> > >
> > > 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<http://localhost:8983/path/to/solr/select/?q=%7B%21bitwise>
> > field=fieldname op=OPERATION_NAME source=sourcevalue
> > negate=boolean}remainder of query
> > > Example :
> > > http://localhost:8983/solr/bitwise/select/?q={!bitwise<http://localhost:8983/solr/bitwise/select/?q=%7B%21bitwise>
> > 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-unsubscribe@lucene.apache.org
> > For additional commands, e-mail: dev-help@lucene.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
--
"Good Enough" is not good enough.
To give anything less than your best is to sacrifice the gift.
Quality First. Measure Twice. Cut Once.
http://www.israelekpo.com/
Re: [jira] Updated: (SOLR-1913) QParserPlugin plugin for Search Results Filtering Based on Bitwise Operations on Integer Fields
Posted by Pradeep Pujari <Pr...@rocketmail.com>.
Hi Israel,
What would be the business application of this?
Thanks,
Pradeep.
--- On Thu, 5/13/10, Israel Ekpo (JIRA) <ji...@apache.org> wrote:
> From: Israel Ekpo (JIRA) <ji...@apache.org>
> Subject: [jira] Updated: (SOLR-1913) QParserPlugin plugin for Search Results Filtering Based on Bitwise Operations on Integer Fields
> To: dev@lucene.apache.org
> Date: Thursday, May 13, 2010, 7:08 PM
>
> [ https://issues.apache.org/jira/browse/SOLR-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
>
> Israel Ekpo updated SOLR-1913:
> ------------------------------
>
> Attachment: SOLR-1913.bitwise.tar.gz
>
> bitwise_filter_plugin.jar
>
> Attaching JAR file containing the QParserPlugin
>
> 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.
>
> > 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: 1.4, 1.5, 1.6, 3.1, 4.0
> >
> > 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-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] Updated: (SOLR-1913) QParserPlugin plugin for Search Results
Filtering Based on Bitwise Operations on Integer Fields
Posted by "Israel Ekpo (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-1913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Israel Ekpo updated SOLR-1913:
------------------------------
Attachment: SOLR-1913.bitwise.tar.gz
bitwise_filter_plugin.jar
Attaching JAR file containing the QParserPlugin
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.
> 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: 1.4, 1.5, 1.6, 3.1, 4.0
>
> 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-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org