Lucene - Core
  1. Lucene - Core
  2. LUCENE-2460

Search Results Filtering Based on Bitwise Operations on Integer Fields

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.9, 5.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      This package makes it possible to filter results returned from a query based on the results of a bitwise operation on an integer field in the documents returned from the pre-constructed query.

      You can perform three basic types of operations on these integer fields

      • BitwiseOperation.BITWISE_AND (bitwise AND)
      • BitwiseOperation.BITWISE_OR (bitwise inclusive OR)
      • BitwiseOperation.BITWISE_XOR (bitwise exclusive OR)

      You can also negate the results of these operations.

      For example, imagine there is an integer field in the index named "flags" with the a value 8 (1000 in binary). The following results will be expected :

      1. A source value of 8 will match during a BitwiseOperation.BITWISE_AND operation, with negate set to false.
      2. A source value of 4 will match during a BitwiseOperation.BITWISE_AND operation, with negate set to true.

      The BitwiseFilter constructor accepts the following values

      • The name of the integer field (A string)
      • The BitwiseOperation object. Example BitwiseOperation.BITWISE_XOR
      • The source value (an integer)
      • A boolean value indicating whether or not to negate the results of the operation
      • A pre-constructed org.apache.lucene.search.Query

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Unassigned
            Reporter:
            Israel Ekpo
          • Votes:
            4 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

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

                Development