[groonga-dev,02902] ビット演算子を使用したfiler

Back to archive index

shinonon shino****@jcom*****
2014年 11月 1日 (土) 23:05:10 JST


篠田です。

groonga 4.0.7 で、ビット演算子を使用した filter が期待した動作をしません。

table_create --name Files --flags TABLE_HASH_KEY --key_type ShortText
table_create --name Bigram --flags TABLE_PAT_KEY|KEY_NORMALIZE --key_type ShortText --default_tokenizer TokenBigram
column_create --table Files --name flg --flags COLUMN_SCALAR --type UInt64
column_create --table Files --name body --flags COLUMN_SCALAR --type LongText
column_create --table Bigram --name file_index --flags COLUMN_INDEX|WITH_POSITION --type Files --source body
load --table Files 
[{"_key":"1","body":"groonga","flg":16}]

この状態で、

select --table Files --match_columns body --query groonga --filter 'flg==16'

だと検索できますが、

select --table Files --match_columns body --query groonga --filter '(flg&1)==0'

だと検索できません。

何か重大な勘違いをしている気がするのですが、それが分かりません。
どなたか、アドバイスをいただけませんでしょうか?

何卒よろしくお願いいたします。


-- 
篠田 敦
shino****@jcom*****




groonga-dev メーリングリストの案内
Back to archive index