<html><body><div style="color:; background-color:; font-family:MS PGothic, sans-serif;font-size:12pt"><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">ML皆さん</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">Varchar型のいくつか列名入れてindex作成しようとしたら、上記のエラーが出て、ネット検索で、@ktouさんのツイートで、</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">「デフォルトではvarcharの場合は全文検索用のインデックスではなくて等価・大小比較用のインデックスになるからです。</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">オペレータークラスに https://pgroonga.github.io/ja/reference/#varchar-full-text-search-ops-v2 … を指定すると全文検索用のインデックスになり、長さ制限はなくなります。」</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">と書いていますが、解決方法わかりません。</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">順番的に書くと、</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><span style="font-size: 12pt;">Extension作成</span></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><span style="font-size: 12pt;">psql -d testdb --command 'CREATE EXTENSION pgroonga'</span><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><span style="font-size: 12pt;"><br></span></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">した後、</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">CREATE INDEX test_db_index ON test_table USING pgroonga (title, title_kana, author, publisher, note, person_name, place_name pgroonga_varchar_full_text_search_ops_v2);<br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">したのです。</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">それらの列一つ一つは4097バイトより小さいですが、すべて足すと4097バイト超えます。</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">ご存知の方、ヒントください。</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">よろしくお願いします。</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">テスト環境:</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;">CentOS 6.9</div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><span style="font-size: 12pt;">[root@XXX]# rpm -q postgresql96-pgroonga --last</span><br></div><div style="font-family: &quot;MS PGothic&quot;, sans-serif; font-size: 12pt;"><div style="font-size: 12pt;">postgresql96-pgroonga-2.1.5-1.el6.x86_64&nbsp; &nbsp; &nbsp; Thu 20 Sep 2018 10:18:19 PM JST</div></div></div></body></html>