Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1913

QParserPlugin plugin for Search Results Filtering Based on Bitwise Operations on Integer Fields

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 4.9, 6.0
    • search
    • None

    Description

      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.

      Attachments

        1. WEB-INF lib.jpg
          116 kB
          Christopher
        2. solr-bitwise-plugin.jar
          12 kB
          Deepthi Sigireddi
        3. SOLR-1913-src.tar.gz
          8 kB
          Deepthi Sigireddi
        4. SOLR-1913.patch
          66 kB
          Vitaliy Zhovtyuk
        5. SOLR-1913.bitwise.tar.gz
          7 kB
          Israel Ekpo
        6. bitwise_filter_plugin.jar
          10 kB
          Israel Ekpo

        Activity

          People

            Unassigned Unassigned
            iekpo Israel Ekpo
            Votes:
            6 Vote for this issue
            Watchers:
            14 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified