I guess we must add functions for bitwise operations.

say
* bor
* bxor
* band
* bcompliment
These functionalities are trivial to add and may be useful for people
who are familiar with bit operations

--Noble

On Thu, Apr 9, 2009 at 1:10 AM, Erik Hatcher <e...@ehatchersolutions.com> wrote:
> No, there is no support in the query parser for bit-wise queries like that.
>   [Although there might be some funky function query magic that can do
> this?]
>
> My recommendation is to index each bit as a separate field (bit_0, bit_1,
> bit_2....).  You could define a dynamicField bit_* as a boolean type.  Set
> each bit field value to true or false.  And query them separately:
> "bit_2:true AND bit_3:true" for example.
>
>        Erik
>
>
>
> On Apr 8, 2009, at 2:37 PM, AlexxelA wrote:
>
>>
>> One field of my document I use for solr is an integer.  I want to do
>> bitwise
>> operations on that field in my queries
>>
>> Ex :
>>
>> status = 46 (in my solr document)
>> In want to know if the bit #1 (2¹) = 1 --> (46&2) > 0 ?
>> or if bit #2 and #3 (2² + 2³) = 1 (46&12) > 0 ?
>>
>> Can we do something like this :
>>
>> q=status:((46&2)>0) ?
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Query-with-bitwise-operation-tp22956950p22956950.html
>> Sent from the Solr - User mailing list archive at Nabble.com.
>
>



-- 
--Noble Paul

Reply via email to