<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">須藤さんへ<div><br></div><div>江上です。</div><div><br></div><div><p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">/usr/pgsql-10/share/extension/pgroonga--2.1.5.sql の @@ に関わる部分を全て削除すると jsqueryに干渉しなくなりました。</span></p><p style="margin: 0px; font-stretch: normal; line-height: normal;">色々試してみます。</p><div dir="ltr"><br></div><blockquote type="cite"><div dir="ltr"><meta http-equiv="content-type" content="text/html; charset=utf-8"><p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">須藤さんへ</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">江上です。リプライありがとうございます。</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">> なにをやりたいのかピンとこないので、再現するためのSQL一式</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">>(CREATE EXTENSION, CREATE TABLE, > > > CREATE INDEX, INSERT,</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">> SELECTなど)と現状での結果と期待する結果を教えてもらえませんか?</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">jsqueryについての説明を省いてしまって済みません。jsqueryは、以下のURLにあるように、postgresqlの拡張機能で、JSONB型を対象とした検索のユーティリティですが、演算子として@@を使っています。</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">【jsquery情報】</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><a href="https://github.com/postgrespro/jsquery" style="caret-color: rgb(0, 0, 0); background-color: rgba(255, 255, 255, 0);"><font color="#000000">https://github.com/postgrespro/jsquery</font></a></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">今回このjsqueryとpgroongaを併用しようと考えていますが、@@演算子が競合しているため、jsqueryでの検索が上手く出来ません。そこでpgroonga側で@@に反応しないように改造することが可能かについて問合せしました。</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">手前勝手な話なので改造方法を教えて欲しいというよりは、何かヒントをいただけないかというお願いになります。(可能であればの話ですが)</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">以下に、pgroonga拡張前後のjsquery検索の実行状況を示します。(以下の *.b はJSONのオブジェクトの上位をワイルドカードで指定)</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">testdb=# create extension jsquery;</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">CREATE EXTENSION</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">testdb=# SELECT '{"a":{"b":100}}'::jsonb @@ '*.b = 100';</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"> ?column? </span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">----------</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);"> t</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">(1 行)</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">testdb=# create extension pgroonga;</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">CREATE EXTENSION</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 19.1px;"><span style="background-color: rgba(255, 255, 255, 0);"><br></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">同じjsqueryを実行</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">testdb=# SELECT '{"a":{"b":100}}'::jsonb @@ '*.b = 100';</span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">ERROR: pgroonga: jsonb: script: failed to parse script: <*.b = 100>: Syntax error: <|*|.b = 100></span></p>
<p style="margin: 0px; font-stretch: normal; line-height: normal;"><span style="background-color: rgba(255, 255, 255, 0);">---------------------------------------------</span></p></div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>groonga-dev mailing list</span><br><span><a href="mailto:groon****@lists*****">groon****@lists*****</a></span><br><span><a href="https://lists.osdn.me/mailman/listinfo/groonga-dev">https://lists.osdn.me/mailman/listinfo/groonga-dev</a></span><br></div></blockquote></div></body></html>