[groonga-dev,00441] ()~:+><-* などの記号を含んだ文字の検索について

Back to archive index

佐藤 yfa02****@nifty*****
2011年 1月 14日 (金) 22:40:37 JST


お世話になっております、佐藤です。

表題の通り、()~:+><-*などの記号を含んだ文字を検索すると、エラーが返ってきます
。
多分エスケープをしないといけないだろうと思うのですが、具体的にはどのようにエス
ケープ処理等をすればいいのでしょうか。

具体的には以下のようなクエリーをgroongaコマンド経由で実行するとエラーが返って
きました。

select Entries --match_columns "body" --limit "10" --query "(" --offset "0"

[[-63,1295012241.02491,0.000546,"Syntax error! (()",[["yy_syntax_error","ecmas
cript.y",19]]],[]]

ちなみに、実際に利用する際には、rroonga経由で以下のように利用したいと考えてお
ります。

GroongaBase.groonga_context.select("Entries",
                           :match_columns => "body",
                           :query => query,
                           :limit => per_page,
                           :offset => per_page * (page - 1)
                          )


よろしくお願いします。




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