[groonga-dev,03884] インデックスがあるときのselectのfilter内の関数について

Back to archive index

Naoya Murakami visio****@gmail*****
2016年 1月 30日 (土) 10:28:28 JST


村上です。

以下のようにインデックスカラムがないときはselectのfilter内の関数の
結果での式が評価されます。

plugin_register functions/vector
[[0,0.0,0.0],true]
table_create Users TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Users names COLUMN_VECTOR ShortText
[[0,0.0,0.0],true]
load --table Users
[
{"names": ["Alice", "Bob"]},
{"names": ["Tom"]}
]
[[0,0.0,0.0],2]
select Users --filter 'vector_size(names) == 1' --output_columns 'names'
--command_version 2
[[0,0.0,0.0],[[[1],[["names","ShortText"]],[["Tom"]]]]]

しかし、インデックスカラムがある場合は、関数での結果で式を評価できません。
シーケンシャルサーチにはなりますが関数は呼ばれません。
これは仕様ですか?


plugin_register functions/vector
[[0,0.0,0.0],true]
table_create Users TABLE_NO_KEY
[[0,0.0,0.0],true]
column_create Users names COLUMN_VECTOR ShortText
[[0,0.0,0.0],true]
table_create Words TABLE_PAT_KEY ShortText
[[0,0.0,0.0],true]
column_create Words users COLUMN_INDEX Users names
[[0,0.0,0.0],true]
load --table Users
[
{"names": ["Alice", "Bob"]},
{"names": ["Tom"]}
]
[[0,0.0,0.0],2]
select Users --filter 'vector_size(names) == 1' --output_columns 'names'
--command_version 2
[[0,0.0,0.0],[[[0],[["names","ShortText"]]]]]

よろしくお願いします。
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
Télécharger 



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