[Groonga-commit] pgroonga/pgroonga at 87ab486 [master] Stop to use "?" for operator name

Back to archive index

Kouhei Sutou null+****@clear*****
Sun Jul 2 21:27:10 JST 2017


Kouhei Sutou	2017-07-02 21:27:10 +0900 (Sun, 02 Jul 2017)

  New Revision: 87ab4863246e8c8d12861685e42ff773d4cb67d7
  https://github.com/pgroonga/pgroonga/commit/87ab4863246e8c8d12861685e42ff773d4cb67d7

  Message:
    Stop to use "?" for operator name
    
    GitHub: fix #45
    
    "?" conflicts with placeholder in SQL prepared statement.
    
      * &?  -> &@~
      * &~? -> &@*
      * &?| -> &@~|
    
    Reported by YUKI "Piro" Hiroshi. Thanks!!!

  Copied files:
    expected/full-text-search/text-array/compatibility/v1/query-v2-question/bitmapscan.out
      (from expected/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.out)
    expected/full-text-search/text-array/compatibility/v1/query-v2-question/indexscan.out
      (from expected/full-text-search/text-array/compatibility/v1/query-v2/indexscan.out)
    expected/full-text-search/text-array/compatibility/v1/query-v2-question/seqscan.out
      (from expected/full-text-search/text-array/compatibility/v1/query-v2/seqscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/bitmapscan.out
      (from expected/full-text-search/text-array/query-in-v2/bitmapscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/indexscan.out
      (from expected/full-text-search/text-array/query-in-v2/indexscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/seqscan.out
      (from expected/full-text-search/text-array/query-in-v2/seqscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-in-v2/bitmapscan.out
      (from expected/full-text-search/text-array/query-in-v2/bitmapscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-in-v2/indexscan.out
      (from expected/full-text-search/text-array/query-in-v2/indexscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-in-v2/seqscan.out
      (from expected/full-text-search/text-array/query-in-v2/seqscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-v2/bitmapscan.out
      (from expected/full-text-search/text-array/query-v2/bitmapscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-v2/indexscan.out
      (from expected/full-text-search/text-array/query-v2/indexscan.out)
    expected/full-text-search/text-array/compatibility/v2/query-v2/seqscan.out
      (from expected/full-text-search/text-array/query-v2/seqscan.out)
    expected/full-text-search/text-array/compatibility/v2/similar-v2/bitmapscan.out
      (from expected/full-text-search/text-array/similar-v2/bitmapscan.out)
    expected/full-text-search/text-array/compatibility/v2/similar-v2/indexscan.out
      (from expected/full-text-search/text-array/similar-v2/indexscan.out)
    expected/full-text-search/text-array/compatibility/v2/similar-v2/seqscan.out
      (from sql/full-text-search/text-array/similar-v2/seqscan.sql)
    expected/full-text-search/text/single/compatibility/v1/query-v2-question/bitmapscan.out
      (from expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out)
    expected/full-text-search/text/single/compatibility/v1/query-v2-question/indexscan.out
      (from expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out)
    expected/full-text-search/text/single/compatibility/v1/query-v2-question/seqscan.out
      (from expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out)
    expected/full-text-search/text/single/compatibility/v2/query-in-v2-greater/bitmapscan.out
      (from expected/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.out)
    expected/full-text-search/text/single/compatibility/v2/query-in-v2-greater/indexscan.out
      (from expected/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.out)
    expected/full-text-search/text/single/compatibility/v2/query-in-v2-greater/seqscan.out
      (from expected/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.out)
    expected/full-text-search/text/single/compatibility/v2/query-v2/bitmapscan.out
      (from expected/full-text-search/text/single/query-v2/bitmapscan.out)
    expected/full-text-search/text/single/compatibility/v2/query-v2/indexscan.out
      (from expected/full-text-search/text/single/query-v2/indexscan.out)
    expected/full-text-search/text/single/compatibility/v2/query-v2/seqscan.out
      (from expected/full-text-search/text/single/query-v2/seqscan.out)
    expected/full-text-search/text/single/compatibility/v2/similar-v2/bitmapscan.out
      (from expected/full-text-search/text/single/similar-v2/bitmapscan.out)
    expected/full-text-search/text/single/compatibility/v2/similar-v2/indexscan.out
      (from expected/full-text-search/text/single/similar-v2/indexscan.out)
    expected/full-text-search/text/single/compatibility/v2/similar-v2/seqscan.out
      (from sql/full-text-search/text/single/similar-v2/seqscan.sql)
    expected/full-text-search/varchar/compatibility/v1/query-v2-question/bitmapscan.out
      (from expected/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.out)
    expected/full-text-search/varchar/compatibility/v1/query-v2-question/indexscan.out
      (from expected/full-text-search/varchar/compatibility/v1/query-v2/indexscan.out)
    expected/full-text-search/varchar/compatibility/v1/query-v2-question/seqscan.out
      (from expected/full-text-search/varchar/compatibility/v1/query-v2/seqscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/bitmapscan.out
      (from expected/full-text-search/varchar/query-in-v2/bitmapscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/indexscan.out
      (from expected/full-text-search/varchar/query-in-v2/indexscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/seqscan.out
      (from expected/full-text-search/varchar/query-in-v2/seqscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-in-v2/bitmapscan.out
      (from expected/full-text-search/varchar/query-in-v2/bitmapscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-in-v2/indexscan.out
      (from expected/full-text-search/varchar/query-in-v2/indexscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-in-v2/seqscan.out
      (from expected/full-text-search/varchar/query-in-v2/seqscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-v2/bitmapscan.out
      (from expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-v2/indexscan.out
      (from expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out)
    expected/full-text-search/varchar/compatibility/v2/query-v2/seqscan.out
      (from expected/full-text-search/varchar/query-v2/seqscan.out)
    expected/full-text-search/varchar/compatibility/v2/similar-v2/bitmapscan.out
      (from expected/full-text-search/varchar/similar-v2/bitmapscan.out)
    expected/full-text-search/varchar/compatibility/v2/similar-v2/indexscan.out
      (from expected/full-text-search/varchar/similar-v2/indexscan.out)
    expected/full-text-search/varchar/compatibility/v2/similar-v2/seqscan.out
      (from sql/full-text-search/varchar/similar-v2/seqscan.sql)
    expected/jsonb/compatibility/v1/query-v2-question/element/bitmapscan.out
      (from expected/jsonb/compatibility/v1/query-v2/element/bitmapscan.out)
    expected/jsonb/compatibility/v1/query-v2-question/element/indexscan.out
      (from expected/jsonb/compatibility/v1/query-v2/element/indexscan.out)
    expected/jsonb/compatibility/v1/query-v2-question/element/seqscan.out
      (from expected/jsonb/query-v2/element/seqscan.out)
    expected/jsonb/compatibility/v1/query-v2-question/value/bitmapscan.out
      (from expected/jsonb/compatibility/v1/query-v2/value/bitmapscan.out)
    expected/jsonb/compatibility/v1/query-v2-question/value/indexscan.out
      (from expected/jsonb/compatibility/v1/query-v2/value/indexscan.out)
    expected/jsonb/compatibility/v1/query-v2-question/value/seqscan.out
      (from expected/jsonb/query-v2/value/seqscan.out)
    expected/jsonb/compatibility/v2/query-v2/element/bitmapscan.out
      (from expected/jsonb/query-v2/element/bitmapscan.out)
    expected/jsonb/compatibility/v2/query-v2/element/indexscan.out
      (from expected/jsonb/query-v2/element/indexscan.out)
    expected/jsonb/compatibility/v2/query-v2/element/seqscan.out
      (from expected/jsonb/query-v2/element/seqscan.out)
    expected/jsonb/compatibility/v2/query-v2/value/bitmapscan.out
      (from expected/jsonb/query-v2/value/bitmapscan.out)
    expected/jsonb/compatibility/v2/query-v2/value/indexscan.out
      (from expected/jsonb/query-v2/value/indexscan.out)
    expected/jsonb/compatibility/v2/query-v2/value/seqscan.out
      (from expected/jsonb/query-v2/value/seqscan.out)
    sql/full-text-search/text-array/compatibility/v1/query-v2-question/bitmapscan.sql
      (from sql/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.sql)
    sql/full-text-search/text-array/compatibility/v1/query-v2-question/indexscan.sql
      (from sql/full-text-search/text-array/compatibility/v1/query-v2/indexscan.sql)
    sql/full-text-search/text-array/compatibility/v1/query-v2-question/seqscan.sql
      (from sql/full-text-search/text-array/compatibility/v1/query-v2/seqscan.sql)
    sql/full-text-search/text-array/compatibility/v2/query-in-v2/bitmapscan.sql
      (from sql/full-text-search/text-array/query-in-v2/bitmapscan.sql)
    sql/full-text-search/text-array/compatibility/v2/query-in-v2/indexscan.sql
      (from sql/full-text-search/text-array/query-in-v2/indexscan.sql)
    sql/full-text-search/text-array/compatibility/v2/query-in-v2/seqscan.sql
      (from sql/full-text-search/text-array/query-in-v2/seqscan.sql)
    sql/full-text-search/text-array/compatibility/v2/query-v2/bitmapscan.sql
      (from sql/full-text-search/text-array/query-v2/bitmapscan.sql)
    sql/full-text-search/text-array/compatibility/v2/query-v2/indexscan.sql
      (from sql/full-text-search/text-array/query-v2/indexscan.sql)
    sql/full-text-search/text-array/compatibility/v2/query-v2/seqscan.sql
      (from sql/full-text-search/text-array/query-v2/seqscan.sql)
    sql/full-text-search/text-array/compatibility/v2/similar-v2/bitmapscan.sql
      (from sql/full-text-search/text-array/similar-v2/bitmapscan.sql)
    sql/full-text-search/text-array/compatibility/v2/similar-v2/indexscan.sql
      (from sql/full-text-search/text-array/similar-v2/indexscan.sql)
    sql/full-text-search/text-array/compatibility/v2/similar-v2/seqscan.sql
      (from sql/full-text-search/text-array/similar-v2/seqscan.sql)
    sql/full-text-search/text/single/compatibility/v1/query-v2-question/bitmapscan.sql
      (from sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql)
    sql/full-text-search/text/single/compatibility/v1/query-v2-question/indexscan.sql
      (from sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql)
    sql/full-text-search/text/single/compatibility/v1/query-v2-question/seqscan.sql
      (from sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql)
    sql/full-text-search/text/single/compatibility/v2/query-in-v2-greater/bitmapscan.sql
      (from sql/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.sql)
    sql/full-text-search/text/single/compatibility/v2/query-in-v2-greater/indexscan.sql
      (from sql/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.sql)
    sql/full-text-search/text/single/compatibility/v2/query-in-v2-greater/seqscan.sql
      (from sql/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.sql)
    sql/full-text-search/text/single/compatibility/v2/query-v2/bitmapscan.sql
      (from sql/full-text-search/text/single/query-v2/bitmapscan.sql)
    sql/full-text-search/text/single/compatibility/v2/query-v2/indexscan.sql
      (from sql/full-text-search/text/single/query-v2/indexscan.sql)
    sql/full-text-search/text/single/compatibility/v2/query-v2/seqscan.sql
      (from sql/full-text-search/text/single/query-v2/seqscan.sql)
    sql/full-text-search/text/single/compatibility/v2/similar-v2/bitmapscan.sql
      (from sql/full-text-search/text/single/similar-v2/bitmapscan.sql)
    sql/full-text-search/text/single/compatibility/v2/similar-v2/indexscan.sql
      (from sql/full-text-search/text/single/similar-v2/indexscan.sql)
    sql/full-text-search/text/single/compatibility/v2/similar-v2/seqscan.sql
      (from sql/full-text-search/text/single/similar-v2/seqscan.sql)
    sql/full-text-search/varchar/compatibility/v1/query-v2-question/bitmapscan.sql
      (from sql/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.sql)
    sql/full-text-search/varchar/compatibility/v1/query-v2-question/indexscan.sql
      (from sql/full-text-search/varchar/compatibility/v1/query-v2/indexscan.sql)
    sql/full-text-search/varchar/compatibility/v1/query-v2-question/seqscan.sql
      (from sql/full-text-search/varchar/compatibility/v1/query-v2/seqscan.sql)
    sql/full-text-search/varchar/compatibility/v2/query-in-v2/bitmapscan.sql
      (from sql/full-text-search/varchar/query-in-v2/bitmapscan.sql)
    sql/full-text-search/varchar/compatibility/v2/query-in-v2/indexscan.sql
      (from sql/full-text-search/varchar/query-in-v2/indexscan.sql)
    sql/full-text-search/varchar/compatibility/v2/query-in-v2/seqscan.sql
      (from sql/full-text-search/varchar/query-in-v2/seqscan.sql)
    sql/full-text-search/varchar/compatibility/v2/query-v2/bitmapscan.sql
      (from sql/full-text-search/varchar/query-v2/bitmapscan.sql)
    sql/full-text-search/varchar/compatibility/v2/query-v2/indexscan.sql
      (from sql/full-text-search/varchar/query-v2/indexscan.sql)
    sql/full-text-search/varchar/compatibility/v2/query-v2/seqscan.sql
      (from sql/full-text-search/varchar/query-v2/seqscan.sql)
    sql/full-text-search/varchar/compatibility/v2/similar-v2/bitmapscan.sql
      (from sql/full-text-search/varchar/similar-v2/bitmapscan.sql)
    sql/full-text-search/varchar/compatibility/v2/similar-v2/indexscan.sql
      (from sql/full-text-search/varchar/similar-v2/indexscan.sql)
    sql/full-text-search/varchar/compatibility/v2/similar-v2/seqscan.sql
      (from sql/full-text-search/varchar/similar-v2/seqscan.sql)
    sql/jsonb/compatibility/v1/query-v2-question/element/bitmapscan.sql
      (from sql/jsonb/compatibility/v1/query-v2/element/bitmapscan.sql)
    sql/jsonb/compatibility/v1/query-v2-question/element/indexscan.sql
      (from sql/jsonb/compatibility/v1/query-v2/element/indexscan.sql)
    sql/jsonb/compatibility/v1/query-v2-question/element/seqscan.sql
      (from sql/jsonb/query-v2/element/seqscan.sql)
    sql/jsonb/compatibility/v1/query-v2-question/value/bitmapscan.sql
      (from sql/jsonb/compatibility/v1/query-v2/value/bitmapscan.sql)
    sql/jsonb/compatibility/v1/query-v2-question/value/indexscan.sql
      (from sql/jsonb/compatibility/v1/query-v2/value/indexscan.sql)
    sql/jsonb/compatibility/v1/query-v2-question/value/seqscan.sql
      (from sql/jsonb/query-v2/value/seqscan.sql)
    sql/jsonb/compatibility/v2/query-v2/element/bitmapscan.sql
      (from sql/jsonb/query-v2/element/bitmapscan.sql)
    sql/jsonb/compatibility/v2/query-v2/element/indexscan.sql
      (from sql/jsonb/query-v2/element/indexscan.sql)
    sql/jsonb/compatibility/v2/query-v2/element/seqscan.sql
      (from sql/jsonb/query-v2/element/seqscan.sql)
    sql/jsonb/compatibility/v2/query-v2/value/bitmapscan.sql
      (from sql/jsonb/query-v2/value/bitmapscan.sql)
    sql/jsonb/compatibility/v2/query-v2/value/indexscan.sql
      (from sql/jsonb/query-v2/value/indexscan.sql)
    sql/jsonb/compatibility/v2/query-v2/value/seqscan.sql
      (from sql/jsonb/query-v2/value/seqscan.sql)
  Modified files:
    data/pgroonga--1.2.1--1.2.2.sql
    data/pgroonga.sql
    expected/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.out
    expected/full-text-search/text-array/compatibility/v1/query-v2/indexscan.out
    expected/full-text-search/text-array/compatibility/v1/query-v2/seqscan.out
    expected/full-text-search/text-array/query-in-v2/bitmapscan.out
    expected/full-text-search/text-array/query-in-v2/indexscan.out
    expected/full-text-search/text-array/query-in-v2/seqscan.out
    expected/full-text-search/text-array/query-v2/bitmapscan.out
    expected/full-text-search/text-array/query-v2/indexscan.out
    expected/full-text-search/text-array/query-v2/seqscan.out
    expected/full-text-search/text-array/similar-v2/bitmapscan.out
    expected/full-text-search/text-array/similar-v2/indexscan.out
    expected/full-text-search/text-array/similar-v2/seqscan.out
    expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out
    expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out
    expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out
    expected/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.out
    expected/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.out
    expected/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.out
    expected/full-text-search/text/single/query-in-v2/bitmapscan.out
    expected/full-text-search/text/single/query-in-v2/indexscan.out
    expected/full-text-search/text/single/query-in-v2/seqscan.out
    expected/full-text-search/text/single/query-v2/bitmapscan.out
    expected/full-text-search/text/single/query-v2/indexscan.out
    expected/full-text-search/text/single/query-v2/seqscan.out
    expected/full-text-search/text/single/similar-v2/bitmapscan.out
    expected/full-text-search/text/single/similar-v2/indexscan.out
    expected/full-text-search/text/single/similar-v2/seqscan.out
    expected/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.out
    expected/full-text-search/varchar/compatibility/v1/query-v2/indexscan.out
    expected/full-text-search/varchar/compatibility/v1/query-v2/seqscan.out
    expected/full-text-search/varchar/query-in-v2/bitmapscan.out
    expected/full-text-search/varchar/query-in-v2/indexscan.out
    expected/full-text-search/varchar/query-in-v2/seqscan.out
    expected/full-text-search/varchar/query-v2/bitmapscan.out
    expected/full-text-search/varchar/query-v2/indexscan.out
    expected/full-text-search/varchar/query-v2/seqscan.out
    expected/full-text-search/varchar/similar-v2/bitmapscan.out
    expected/full-text-search/varchar/similar-v2/indexscan.out
    expected/full-text-search/varchar/similar-v2/seqscan.out
    expected/jsonb/compatibility/v1/query-v2/element/bitmapscan.out
    expected/jsonb/compatibility/v1/query-v2/element/indexscan.out
    expected/jsonb/compatibility/v1/query-v2/element/seqscan.out
    expected/jsonb/compatibility/v1/query-v2/value/bitmapscan.out
    expected/jsonb/compatibility/v1/query-v2/value/indexscan.out
    expected/jsonb/compatibility/v1/query-v2/value/seqscan.out
    expected/jsonb/query-v2/element/bitmapscan.out
    expected/jsonb/query-v2/element/indexscan.out
    expected/jsonb/query-v2/element/seqscan.out
    expected/jsonb/query-v2/value/bitmapscan.out
    expected/jsonb/query-v2/value/indexscan.out
    expected/jsonb/query-v2/value/seqscan.out
    sql/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.sql
    sql/full-text-search/text-array/compatibility/v1/query-v2/indexscan.sql
    sql/full-text-search/text-array/compatibility/v1/query-v2/seqscan.sql
    sql/full-text-search/text-array/query-in-v2/bitmapscan.sql
    sql/full-text-search/text-array/query-in-v2/indexscan.sql
    sql/full-text-search/text-array/query-in-v2/seqscan.sql
    sql/full-text-search/text-array/query-v2/bitmapscan.sql
    sql/full-text-search/text-array/query-v2/indexscan.sql
    sql/full-text-search/text-array/query-v2/seqscan.sql
    sql/full-text-search/text-array/similar-v2/bitmapscan.sql
    sql/full-text-search/text-array/similar-v2/indexscan.sql
    sql/full-text-search/text-array/similar-v2/seqscan.sql
    sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql
    sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql
    sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql
    sql/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.sql
    sql/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.sql
    sql/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.sql
    sql/full-text-search/text/single/query-in-v2/bitmapscan.sql
    sql/full-text-search/text/single/query-in-v2/indexscan.sql
    sql/full-text-search/text/single/query-in-v2/seqscan.sql
    sql/full-text-search/text/single/query-v2/bitmapscan.sql
    sql/full-text-search/text/single/query-v2/indexscan.sql
    sql/full-text-search/text/single/query-v2/seqscan.sql
    sql/full-text-search/text/single/similar-v2/bitmapscan.sql
    sql/full-text-search/text/single/similar-v2/indexscan.sql
    sql/full-text-search/text/single/similar-v2/seqscan.sql
    sql/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.sql
    sql/full-text-search/varchar/compatibility/v1/query-v2/indexscan.sql
    sql/full-text-search/varchar/compatibility/v1/query-v2/seqscan.sql
    sql/full-text-search/varchar/query-in-v2/bitmapscan.sql
    sql/full-text-search/varchar/query-in-v2/indexscan.sql
    sql/full-text-search/varchar/query-in-v2/seqscan.sql
    sql/full-text-search/varchar/query-v2/bitmapscan.sql
    sql/full-text-search/varchar/query-v2/indexscan.sql
    sql/full-text-search/varchar/query-v2/seqscan.sql
    sql/full-text-search/varchar/similar-v2/bitmapscan.sql
    sql/full-text-search/varchar/similar-v2/indexscan.sql
    sql/full-text-search/varchar/similar-v2/seqscan.sql
    sql/jsonb/compatibility/v1/query-v2/element/bitmapscan.sql
    sql/jsonb/compatibility/v1/query-v2/element/indexscan.sql
    sql/jsonb/compatibility/v1/query-v2/element/seqscan.sql
    sql/jsonb/compatibility/v1/query-v2/value/bitmapscan.sql
    sql/jsonb/compatibility/v1/query-v2/value/indexscan.sql
    sql/jsonb/compatibility/v1/query-v2/value/seqscan.sql
    sql/jsonb/query-v2/element/bitmapscan.sql
    sql/jsonb/query-v2/element/indexscan.sql
    sql/jsonb/query-v2/element/seqscan.sql
    sql/jsonb/query-v2/value/bitmapscan.sql
    sql/jsonb/query-v2/value/indexscan.sql
    sql/jsonb/query-v2/value/seqscan.sql
    src/pgrn-jsonb.c
    src/pgroonga.c
    src/pgroonga.h

  Modified: data/pgroonga--1.2.1--1.2.2.sql (+131 -0)
===================================================================
--- data/pgroonga--1.2.1--1.2.2.sql    2017-07-01 16:43:19 +0900 (7524183)
+++ data/pgroonga--1.2.1--1.2.2.sql    2017-07-02 21:27:10 +0900 (451224d)
@@ -15,3 +15,134 @@ ALTER OPERATOR FAMILY pgroonga.text_term_search_ops_v2 USING pgroonga
 		OPERATOR 3 = (text, text),
 		OPERATOR 4 >= (text, text),
 		OPERATOR 5 > (text, text);
+
+-- &? -> &@~
+-- &~? -> &@*
+-- &?| -> &@~|
+CREATE OPERATOR &@~ (
+	PROCEDURE = pgroonga.query_text,
+	LEFTARG = text,
+	RIGHTARG = text
+);
+
+CREATE OPERATOR &@~ (
+	PROCEDURE = pgroonga.query_text_array,
+	LEFTARG = text[],
+	RIGHTARG = text
+);
+
+CREATE OPERATOR &@~ (
+	PROCEDURE = pgroonga.query_varchar,
+	LEFTARG = varchar,
+	RIGHTARG = varchar
+);
+
+DO LANGUAGE plpgsql $$
+BEGIN
+	PERFORM 1
+		FROM pg_type
+		WHERE typname = 'jsonb';
+
+	IF FOUND THEN
+		CREATE OPERATOR &@~ (
+			PROCEDURE = pgroonga.query_jsonb,
+			LEFTARG = jsonb,
+			RIGHTARG = text
+		);
+	END IF;
+END;
+$$;
+
+CREATE OPERATOR &@* (
+	PROCEDURE = pgroonga.similar_text,
+	LEFTARG = text,
+	RIGHTARG = text
+);
+
+CREATE OPERATOR &@* (
+	PROCEDURE = pgroonga.similar_text_array,
+	LEFTARG = text[],
+	RIGHTARG = text
+);
+
+CREATE OPERATOR &@* (
+	PROCEDURE = pgroonga.similar_varchar,
+	LEFTARG = varchar,
+	RIGHTARG = varchar
+);
+
+CREATE OPERATOR &@~| (
+	PROCEDURE = pgroonga.query_in_text,
+	LEFTARG = text,
+	RIGHTARG = text[]
+);
+
+CREATE OPERATOR &@~| (
+	PROCEDURE = pgroonga.query_in_text_array,
+	LEFTARG = text[],
+	RIGHTARG = text[]
+);
+
+CREATE OPERATOR &@~| (
+	PROCEDURE = pgroonga.query_in_varchar,
+	LEFTARG = varchar,
+	RIGHTARG = varchar[]
+);
+
+ALTER OPERATOR FAMILY pgroonga.text_full_text_search_ops USING pgroonga
+	ADD
+		OPERATOR 28 &@~ (text, text);
+
+ALTER OPERATOR FAMILY pgroonga.text_array_full_text_search_ops USING pgroonga
+	ADD
+		OPERATOR 28 &@~ (text[], text);
+
+ALTER OPERATOR FAMILY pgroonga.varchar_full_text_search_ops USING pgroonga
+	ADD
+		OPERATOR 28 &@~ (varchar, varchar);
+
+DO LANGUAGE plpgsql $$
+BEGIN
+	PERFORM 1
+		FROM pg_type
+		WHERE typname = 'jsonb';
+
+	IF FOUND THEN
+		ALTER OPERATOR FAMILY pgroonga.jsonb_ops USING pgroonga
+			ADD
+				OPERATOR 28 &@~ (jsonb, text);
+	END IF;
+END;
+$$;
+
+ALTER OPERATOR FAMILY pgroonga.text_full_text_search_ops_v2 USING pgroonga
+	ADD
+		OPERATOR 28 &@~ (text, text),
+		OPERATOR 29 &@* (text, text),
+		OPERATOR 30 &@~| (text, text[]);
+
+ALTER OPERATOR FAMILY pgroonga.text_array_full_text_search_ops_v2 USING pgroonga
+	ADD
+		OPERATOR 28 &@~ (text[], text),
+		OPERATOR 29 &@* (text[], text),
+		OPERATOR 30 &@~| (text[], text[]);
+
+ALTER OPERATOR FAMILY pgroonga.varchar_full_text_search_ops_v2 USING pgroonga
+	ADD
+		OPERATOR 28 &@~ (varchar, varchar),
+		OPERATOR 29 &@* (varchar, varchar),
+		OPERATOR 30 &@~| (varchar, varchar[]);
+
+DO LANGUAGE plpgsql $$
+BEGIN
+	PERFORM 1
+		FROM pg_type
+		WHERE typname = 'jsonb';
+
+	IF FOUND THEN
+		ALTER OPERATOR FAMILY pgroonga.jsonb_ops_v2 USING pgroonga
+			ADD
+				OPERATOR 28 &@~ (jsonb, text);
+	END IF;
+END;
+$$;

  Modified: data/pgroonga.sql (+101 -17)
===================================================================
--- data/pgroonga.sql    2017-07-01 16:43:19 +0900 (7a33f14)
+++ data/pgroonga.sql    2017-07-02 21:27:10 +0900 (25305e6)
@@ -371,12 +371,19 @@ CREATE FUNCTION pgroonga.query_text(text, text)
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &? (
 	PROCEDURE = pgroonga.query_text,
 	LEFTARG = text,
 	RIGHTARG = text
 );
 
+CREATE OPERATOR &@~ (
+	PROCEDURE = pgroonga.query_text,
+	LEFTARG = text,
+	RIGHTARG = text
+);
+
 CREATE FUNCTION pgroonga.query_text_array(text[], text)
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_query_text_array'
@@ -384,12 +391,19 @@ CREATE FUNCTION pgroonga.query_text_array(text[], text)
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &? (
 	PROCEDURE = pgroonga.query_text_array,
 	LEFTARG = text[],
 	RIGHTARG = text
 );
 
+CREATE OPERATOR &@~ (
+	PROCEDURE = pgroonga.query_text_array,
+	LEFTARG = text[],
+	RIGHTARG = text
+);
+
 CREATE FUNCTION pgroonga.query_varchar(varchar, varchar)
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_query_varchar'
@@ -397,12 +411,19 @@ CREATE FUNCTION pgroonga.query_varchar(varchar, varchar)
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &? (
 	PROCEDURE = pgroonga.query_varchar,
 	LEFTARG = varchar,
 	RIGHTARG = varchar
 );
 
+CREATE OPERATOR &@~ (
+	PROCEDURE = pgroonga.query_varchar,
+	LEFTARG = varchar,
+	RIGHTARG = varchar
+);
+
 DO LANGUAGE plpgsql $$
 BEGIN
 	PERFORM 1
@@ -417,11 +438,18 @@ BEGIN
 			IMMUTABLE
 			STRICT;
 
+		-- Deprecated since 1.2.2.
 		CREATE OPERATOR &? (
 			PROCEDURE = pgroonga.query_jsonb,
 			LEFTARG = jsonb,
 			RIGHTARG = text
 		);
+
+		CREATE OPERATOR &@~ (
+			PROCEDURE = pgroonga.query_jsonb,
+			LEFTARG = jsonb,
+			RIGHTARG = text
+		);
 	END IF;
 END;
 $$;
@@ -433,12 +461,19 @@ CREATE FUNCTION pgroonga.similar_text(text, text)
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &~? (
 	PROCEDURE = pgroonga.similar_text,
 	LEFTARG = text,
 	RIGHTARG = text
 );
 
+CREATE OPERATOR &@* (
+	PROCEDURE = pgroonga.similar_text,
+	LEFTARG = text,
+	RIGHTARG = text
+);
+
 CREATE FUNCTION pgroonga.similar_text_array(text[], text)
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_similar_text_array'
@@ -446,12 +481,19 @@ CREATE FUNCTION pgroonga.similar_text_array(text[], text)
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &~? (
 	PROCEDURE = pgroonga.similar_text_array,
 	LEFTARG = text[],
 	RIGHTARG = text
 );
 
+CREATE OPERATOR &@* (
+	PROCEDURE = pgroonga.similar_text_array,
+	LEFTARG = text[],
+	RIGHTARG = text
+);
+
 CREATE FUNCTION pgroonga.similar_varchar(varchar, varchar)
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_similar_varchar'
@@ -459,12 +501,19 @@ CREATE FUNCTION pgroonga.similar_varchar(varchar, varchar)
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &~? (
 	PROCEDURE = pgroonga.similar_varchar,
 	LEFTARG = varchar,
 	RIGHTARG = varchar
 );
 
+CREATE OPERATOR &@* (
+	PROCEDURE = pgroonga.similar_varchar,
+	LEFTARG = varchar,
+	RIGHTARG = varchar
+);
+
 CREATE FUNCTION pgroonga.prefix_text(text, text)
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_prefix_text'
@@ -653,12 +702,19 @@ CREATE OPERATOR &?> (
 	RIGHTARG = text[]
 );
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &?| (
 	PROCEDURE = pgroonga.query_in_text,
 	LEFTARG = text,
 	RIGHTARG = text[]
 );
 
+CREATE OPERATOR &@~| (
+	PROCEDURE = pgroonga.query_in_text,
+	LEFTARG = text,
+	RIGHTARG = text[]
+);
+
 CREATE FUNCTION pgroonga.query_in_text_array(text[], text[])
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_query_in_text_array'
@@ -666,12 +722,19 @@ CREATE FUNCTION pgroonga.query_in_text_array(text[], text[])
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &?| (
 	PROCEDURE = pgroonga.query_in_text_array,
 	LEFTARG = text[],
 	RIGHTARG = text[]
 );
 
+CREATE OPERATOR &@~| (
+	PROCEDURE = pgroonga.query_in_text_array,
+	LEFTARG = text[],
+	RIGHTARG = text[]
+);
+
 CREATE FUNCTION pgroonga.query_in_varchar(varchar, varchar[])
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_query_in_varchar'
@@ -679,12 +742,19 @@ CREATE FUNCTION pgroonga.query_in_varchar(varchar, varchar[])
 	IMMUTABLE
 	STRICT;
 
+-- Deprecated since 1.2.2.
 CREATE OPERATOR &?| (
 	PROCEDURE = pgroonga.query_in_varchar,
 	LEFTARG = varchar,
 	RIGHTARG = varchar[]
 );
 
+CREATE OPERATOR &@~| (
+	PROCEDURE = pgroonga.query_in_varchar,
+	LEFTARG = varchar,
+	RIGHTARG = varchar[]
+);
+
 CREATE FUNCTION pgroonga.prefix_in_text(text, text[])
 	RETURNS bool
 	AS 'MODULE_PATHNAME', 'pgroonga_prefix_in_text'
@@ -873,7 +943,8 @@ CREATE OPERATOR CLASS pgroonga.text_full_text_search_ops DEFAULT FOR TYPE text
 		OPERATOR 8 %%,
 		OPERATOR 9 @@,
 		OPERATOR 12 &@,
-		OPERATOR 13 &?;
+		OPERATOR 13 &?, -- For backward compatibility
+		OPERATOR 28 &@~;
 
 CREATE OPERATOR CLASS pgroonga.text_array_full_text_search_ops
 	DEFAULT
@@ -882,14 +953,16 @@ CREATE OPERATOR CLASS pgroonga.text_array_full_text_search_ops
 		OPERATOR 8 %% (text[], text),
 		OPERATOR 9 @@ (text[], text),
 		OPERATOR 12 &@ (text[], text),
-		OPERATOR 13 &? (text[], text);
+		OPERATOR 13 &? (text[], text), -- For backward compatibility
+		OPERATOR 28 &@~ (text[], text);
 
 CREATE OPERATOR CLASS pgroonga.varchar_full_text_search_ops FOR TYPE varchar
 	USING pgroonga AS
 		OPERATOR 8 %%,
 		OPERATOR 9 @@,
 		OPERATOR 12 &@,
-		OPERATOR 13 &?;
+		OPERATOR 13 &?, -- For backward compatibility
+		OPERATOR 28 &@~;
 
 CREATE OPERATOR CLASS pgroonga.varchar_ops DEFAULT FOR TYPE varchar
 	USING pgroonga AS
@@ -995,8 +1068,9 @@ BEGIN
 				OPERATOR 9 @@ (jsonb, text),
 				OPERATOR 11 @>,
 				OPERATOR 12 &@ (jsonb, text),
-				OPERATOR 13 &? (jsonb, text),
-				OPERATOR 15 &` (jsonb, text);
+				OPERATOR 13 &? (jsonb, text), -- For backward compatibility
+				OPERATOR 15 &` (jsonb, text),
+				OPERATOR 28 &@~ (jsonb, text);
 	END IF;
 END;
 $$;
@@ -1021,13 +1095,16 @@ CREATE OPERATOR CLASS pgroonga.text_full_text_search_ops_v2 FOR TYPE text
 		OPERATOR 8 %%, -- For backward compatibility
 		OPERATOR 9 @@, -- For backward compatibility
 		OPERATOR 12 &@,
-		OPERATOR 13 &?,
-		OPERATOR 14 &~?,
+		OPERATOR 13 &?, -- For backward compatibility
+		OPERATOR 14 &~?, -- For backward compatibility
 		OPERATOR 15 &`,
 		OPERATOR 18 &@| (text, text[]),
-		OPERATOR 19 &?| (text, text[]),
+		OPERATOR 19 &?| (text, text[]), -- For backward compatibility
 		OPERATOR 26 &@> (text, text[]), -- For backward compatibility
-		OPERATOR 27 &?> (text, text[]); -- For backward compatibility
+		OPERATOR 27 &?> (text, text[]), -- For backward compatibility
+		OPERATOR 28 &@~,
+		OPERATOR 29 &@*,
+		OPERATOR 30 &@~| (text, text[]);
 
 CREATE OPERATOR CLASS pgroonga.text_array_full_text_search_ops_v2
 	FOR TYPE text[]
@@ -1035,11 +1112,14 @@ CREATE OPERATOR CLASS pgroonga.text_array_full_text_search_ops_v2
 		OPERATOR 8 %% (text[], text), -- For backward compatibility
 		OPERATOR 9 @@ (text[], text), -- For backward compatibility
 		OPERATOR 12 &@ (text[], text),
-		OPERATOR 13 &? (text[], text),
-		OPERATOR 14 &~? (text[], text),
+		OPERATOR 13 &? (text[], text), -- For backward compatibility
+		OPERATOR 14 &~? (text[], text), -- For backward compatibility
 		OPERATOR 15 &` (text[], text),
 		OPERATOR 18 &@| (text[], text[]),
-		OPERATOR 19 &?| (text[], text[]);
+		OPERATOR 19 &?| (text[], text[]), -- For backward compatibility
+		OPERATOR 28 &@~ (text[], text),
+		OPERATOR 29 &@* (text[], text),
+		OPERATOR 30 &@~| (text[], text[]);
 
 CREATE OPERATOR CLASS pgroonga.text_term_search_ops_v2 FOR TYPE text
 	USING pgroonga AS
@@ -1075,11 +1155,14 @@ CREATE OPERATOR CLASS pgroonga.varchar_full_text_search_ops_v2
 		OPERATOR 8 %%, -- For backward compatibility
 		OPERATOR 9 @@, -- For backward compatibility
 		OPERATOR 12 &@,
-		OPERATOR 13 &?,
-		OPERATOR 14 &~?,
+		OPERATOR 13 &?, -- For backward compatibility
+		OPERATOR 14 &~?, -- For backward compatibility
 		OPERATOR 15 &`,
 		OPERATOR 18 &@| (varchar, varchar[]),
-		OPERATOR 19 &?| (varchar, varchar[]);
+		OPERATOR 19 &?| (varchar, varchar[]), -- For backward compatibility
+		OPERATOR 28 &@~,
+		OPERATOR 29 &@*,
+		OPERATOR 30 &@~| (varchar, varchar[]);
 
 CREATE OPERATOR CLASS pgroonga.varchar_array_term_search_ops_v2
 	FOR TYPE varchar[]
@@ -1105,8 +1188,9 @@ BEGIN
 				OPERATOR 9 @@ (jsonb, text), -- For backward compatibility
 				OPERATOR 11 @>,
 				OPERATOR 12 &@ (jsonb, text),
-				OPERATOR 13 &? (jsonb, text),
-				OPERATOR 15 &` (jsonb, text);
+				OPERATOR 13 &? (jsonb, text), -- For backward compatibility
+				OPERATOR 15 &` (jsonb, text),
+				OPERATOR 28 &@~ (jsonb, text);
 	END IF;
 END;
 $$;

  Copied: expected/full-text-search/text-array/compatibility/v1/query-v2-question/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v1/query-v2-question/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v1/query-v2-question/seqscan.out (+0 -0) 100%
===================================================================

  Modified: expected/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.out (+6 -6)
===================================================================
--- expected/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (fa3b330)
+++ expected/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (09bde68)
@@ -21,18 +21,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
-                        QUERY PLAN                         
------------------------------------------------------------
+ WHERE contents &@~ 'rdbms OR engine';
+                         QUERY PLAN                         
+------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (contents &? 'rdbms OR engine'::text)
+   Recheck Cond: (contents &@~ 'rdbms OR engine'::text)
    ->  Bitmap Index Scan on pgroonga_memos_index
-         Index Cond: (contents &? 'rdbms OR engine'::text)
+         Index Cond: (contents &@~ 'rdbms OR engine'::text)
 (4 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/compatibility/v1/query-v2/indexscan.out (+5 -5)
===================================================================
--- expected/full-text-search/text-array/compatibility/v1/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (fe3f85e)
+++ expected/full-text-search/text-array/compatibility/v1/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (22bc38e)
@@ -21,16 +21,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
-                     QUERY PLAN                      
------------------------------------------------------
+ WHERE contents &@~ 'rdbms OR engine';
+                      QUERY PLAN                      
+------------------------------------------------------
  Index Scan using pgroonga_memos_index on memos
-   Index Cond: (contents &? 'rdbms OR engine'::text)
+   Index Cond: (contents &@~ 'rdbms OR engine'::text)
 (2 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/compatibility/v1/query-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text-array/compatibility/v1/query-v2/seqscan.out    2017-07-01 16:43:19 +0900 (56921aa)
+++ expected/full-text-search/text-array/compatibility/v1/query-v2/seqscan.out    2017-07-02 21:27:10 +0900 (6a27e4d)
@@ -20,7 +20,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Copied: expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/bitmapscan.out (+4 -4) 86%
===================================================================
--- expected/full-text-search/text-array/query-in-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (e7ab7df)
+++ expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/bitmapscan.out    2017-07-02 21:27:10 +0900 (265bf72)
@@ -21,18 +21,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &?> Array['rdbms', 'groonga engine'];
                               QUERY PLAN                               
 -----------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (contents &?| '{rdbms,"groonga engine"}'::text[])
+   Recheck Cond: (contents &?> '{rdbms,"groonga engine"}'::text[])
    ->  Bitmap Index Scan on pgroonga_memos_index
-         Index Cond: (contents &?| '{rdbms,"groonga engine"}'::text[])
+         Index Cond: (contents &?> '{rdbms,"groonga engine"}'::text[])
 (4 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &?> Array['rdbms', 'groonga engine'];
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Copied: expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/indexscan.out (+3 -3) 89%
===================================================================
--- expected/full-text-search/text-array/query-in-v2/indexscan.out    2017-07-01 16:43:19 +0900 (f8d58e0)
+++ expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/indexscan.out    2017-07-02 21:27:10 +0900 (8ab3fd5)
@@ -21,16 +21,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &?> Array['rdbms', 'groonga engine'];
                            QUERY PLAN                            
 -----------------------------------------------------------------
  Index Scan using pgroonga_memos_index on memos
-   Index Cond: (contents &?| '{rdbms,"groonga engine"}'::text[])
+   Index Cond: (contents &?> '{rdbms,"groonga engine"}'::text[])
 (2 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &?> Array['rdbms', 'groonga engine'];
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  Groonga    | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"}

  Copied: expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/seqscan.out (+1 -1) 95%
===================================================================
--- expected/full-text-search/text-array/query-in-v2/seqscan.out    2017-07-01 16:43:19 +0900 (f476857)
+++ expected/full-text-search/text-array/compatibility/v2/query-in-v2-greater/seqscan.out    2017-07-02 21:27:10 +0900 (454cb2f)
@@ -20,7 +20,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &?> Array['rdbms', 'groonga engine'];
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Copied: expected/full-text-search/text-array/compatibility/v2/query-in-v2/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/query-in-v2/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/query-in-v2/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/query-v2/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/query-v2/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/query-v2/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/similar-v2/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/similar-v2/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text-array/compatibility/v2/similar-v2/seqscan.out (+1 -5) 93%
===================================================================
--- sql/full-text-search/text-array/similar-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (be79ea4)
+++ expected/full-text-search/text-array/compatibility/v2/similar-v2/seqscan.out    2017-07-02 21:27:10 +0900 (aea9a97)
@@ -2,7 +2,6 @@ CREATE TABLE memos (
   title text,
   contents text[]
 );
-
 INSERT INTO memos
      VALUES ('PostgreSQL',
              ARRAY['PostgreSQL is an OSS RDBMS',
@@ -14,16 +13,13 @@ INSERT INTO memos
     VALUES ('PGroonga',
             ARRAY['PGroonga is an OSS PostgreSQL extension',
                   'PGroonga adds full full-text search support based on Groonga to PostgreSQL']);
-
 CREATE INDEX pgroonga_memos_index ON memos
   USING pgroonga (contents pgroonga.text_array_full_text_search_ops_v2);
-
 SET enable_seqscan = on;
 SET enable_indexscan = off;
 SET enable_bitmapscan = off;
-
 SELECT title, contents
   FROM memos
  WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
-
+ERROR:  pgroonga: similar search is available only in index scan
 DROP TABLE memos;

  Modified: expected/full-text-search/text-array/query-in-v2/bitmapscan.out (+6 -6)
===================================================================
--- expected/full-text-search/text-array/query-in-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (e7ab7df)
+++ expected/full-text-search/text-array/query-in-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (eec7cd5)
@@ -21,18 +21,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
-                              QUERY PLAN                               
------------------------------------------------------------------------
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
+                               QUERY PLAN                               
+------------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (contents &?| '{rdbms,"groonga engine"}'::text[])
+   Recheck Cond: (contents &@~| '{rdbms,"groonga engine"}'::text[])
    ->  Bitmap Index Scan on pgroonga_memos_index
-         Index Cond: (contents &?| '{rdbms,"groonga engine"}'::text[])
+         Index Cond: (contents &@~| '{rdbms,"groonga engine"}'::text[])
 (4 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/query-in-v2/indexscan.out (+5 -5)
===================================================================
--- expected/full-text-search/text-array/query-in-v2/indexscan.out    2017-07-01 16:43:19 +0900 (f8d58e0)
+++ expected/full-text-search/text-array/query-in-v2/indexscan.out    2017-07-02 21:27:10 +0900 (80a1fae)
@@ -21,16 +21,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
-                           QUERY PLAN                            
------------------------------------------------------------------
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
+                            QUERY PLAN                            
+------------------------------------------------------------------
  Index Scan using pgroonga_memos_index on memos
-   Index Cond: (contents &?| '{rdbms,"groonga engine"}'::text[])
+   Index Cond: (contents &@~| '{rdbms,"groonga engine"}'::text[])
 (2 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  Groonga    | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"}

  Modified: expected/full-text-search/text-array/query-in-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text-array/query-in-v2/seqscan.out    2017-07-01 16:43:19 +0900 (f476857)
+++ expected/full-text-search/text-array/query-in-v2/seqscan.out    2017-07-02 21:27:10 +0900 (eba2186)
@@ -20,7 +20,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/query-v2/bitmapscan.out (+6 -6)
===================================================================
--- expected/full-text-search/text-array/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (99b16c7)
+++ expected/full-text-search/text-array/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (0dfd075)
@@ -21,18 +21,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
-                        QUERY PLAN                         
------------------------------------------------------------
+ WHERE contents &@~ 'rdbms OR engine';
+                         QUERY PLAN                         
+------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (contents &? 'rdbms OR engine'::text)
+   Recheck Cond: (contents &@~ 'rdbms OR engine'::text)
    ->  Bitmap Index Scan on pgroonga_memos_index
-         Index Cond: (contents &? 'rdbms OR engine'::text)
+         Index Cond: (contents &@~ 'rdbms OR engine'::text)
 (4 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/query-v2/indexscan.out (+5 -5)
===================================================================
--- expected/full-text-search/text-array/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (cc9f907)
+++ expected/full-text-search/text-array/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (4cdc470)
@@ -21,16 +21,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
-                     QUERY PLAN                      
------------------------------------------------------
+ WHERE contents &@~ 'rdbms OR engine';
+                      QUERY PLAN                      
+------------------------------------------------------
  Index Scan using pgroonga_memos_index on memos
-   Index Cond: (contents &? 'rdbms OR engine'::text)
+   Index Cond: (contents &@~ 'rdbms OR engine'::text)
 (2 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/query-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text-array/query-v2/seqscan.out    2017-07-01 16:43:19 +0900 (b5881a8)
+++ expected/full-text-search/text-array/query-v2/seqscan.out    2017-07-02 21:27:10 +0900 (8dd6e77)
@@ -20,7 +20,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
    title    |                                         contents                                          
 ------------+-------------------------------------------------------------------------------------------
  PostgreSQL | {"PostgreSQL is an OSS RDBMS","PostgreSQL has partial full-text search support"}

  Modified: expected/full-text-search/text-array/similar-v2/bitmapscan.out (+4 -4)
===================================================================
--- expected/full-text-search/text-array/similar-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (258fdf2)
+++ expected/full-text-search/text-array/similar-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (445e1ad)
@@ -21,18 +21,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
                                        QUERY PLAN                                        
 -----------------------------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (contents &~? 'Mroonga is a MySQL plugin that uses Groonga.'::text)
+   Recheck Cond: (contents &@* 'Mroonga is a MySQL plugin that uses Groonga.'::text)
    ->  Bitmap Index Scan on pgroonga_memos_index
-         Index Cond: (contents &~? 'Mroonga is a MySQL plugin that uses Groonga.'::text)
+         Index Cond: (contents &@* 'Mroonga is a MySQL plugin that uses Groonga.'::text)
 (4 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
   title   |                                                         contents                                                         
 ----------+--------------------------------------------------------------------------------------------------------------------------
  Groonga  | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"}

  Modified: expected/full-text-search/text-array/similar-v2/indexscan.out (+3 -3)
===================================================================
--- expected/full-text-search/text-array/similar-v2/indexscan.out    2017-07-01 16:43:19 +0900 (a53a6c9)
+++ expected/full-text-search/text-array/similar-v2/indexscan.out    2017-07-02 21:27:10 +0900 (22e7f60)
@@ -21,16 +21,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
                                     QUERY PLAN                                     
 -----------------------------------------------------------------------------------
  Index Scan using pgroonga_memos_index on memos
-   Index Cond: (contents &~? 'Mroonga is a MySQL plugin that uses Groonga.'::text)
+   Index Cond: (contents &@* 'Mroonga is a MySQL plugin that uses Groonga.'::text)
 (2 rows)
 
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
   title   |                                                         contents                                                         
 ----------+--------------------------------------------------------------------------------------------------------------------------
  Groonga  | {"Groonga is an OSS full-text search engine","Groonga has full full-text search support"}

  Modified: expected/full-text-search/text-array/similar-v2/seqscan.out (+2 -2)
===================================================================
--- expected/full-text-search/text-array/similar-v2/seqscan.out    2017-07-01 16:43:19 +0900 (6741d5c)
+++ expected/full-text-search/text-array/similar-v2/seqscan.out    2017-07-02 21:27:10 +0900 (fd01674)
@@ -20,6 +20,6 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
-ERROR:  pgroonga: operator &~? is available only in index scan
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+ERROR:  pgroonga: similar search is available only in index scan
 DROP TABLE memos;

  Copied: expected/full-text-search/text/single/compatibility/v1/query-v2-question/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v1/query-v2-question/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v1/query-v2-question/seqscan.out (+0 -0) 100%
===================================================================

  Modified: expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out (+6 -6)
===================================================================
--- expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (09d1a76)
+++ expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (8dc4fc2)
@@ -13,18 +13,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
-                        QUERY PLAN                        
-----------------------------------------------------------
+ WHERE content &@~ 'rdbms OR engine';
+                        QUERY PLAN                         
+-----------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (content &? 'rdbms OR engine'::text)
+   Recheck Cond: (content &@~ 'rdbms OR engine'::text)
    ->  Bitmap Index Scan on grnindex
-         Index Cond: (content &? 'rdbms OR engine'::text)
+         Index Cond: (content &@~ 'rdbms OR engine'::text)
 (4 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out (+5 -5)
===================================================================
--- expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (ac40d2c)
+++ expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (61e3553)
@@ -13,16 +13,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
-                     QUERY PLAN                     
-----------------------------------------------------
+ WHERE content &@~ 'rdbms OR engine';
+                     QUERY PLAN                      
+-----------------------------------------------------
  Index Scan using grnindex on memos
-   Index Cond: (content &? 'rdbms OR engine'::text)
+   Index Cond: (content &@~ 'rdbms OR engine'::text)
 (2 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out    2017-07-01 16:43:19 +0900 (552025e)
+++ expected/full-text-search/text/single/compatibility/v1/query-v2/seqscan.out    2017-07-02 21:27:10 +0900 (e6cd259)
@@ -13,7 +13,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Copied: expected/full-text-search/text/single/compatibility/v2/query-in-v2-greater/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/query-in-v2-greater/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/query-in-v2-greater/seqscan.out (+0 -0) 100%
===================================================================

  Modified: expected/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.out (+4 -4)
===================================================================
--- expected/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (e96c2d4)
+++ expected/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (4a7734f)
@@ -13,18 +13,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
                               QUERY PLAN                              
 ----------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (content &?> '{rdbms,"groonga engine"}'::text[])
+   Recheck Cond: (content &?| '{rdbms,"groonga engine"}'::text[])
    ->  Bitmap Index Scan on pgrn_index
-         Index Cond: (content &?> '{rdbms,"groonga engine"}'::text[])
+         Index Cond: (content &?| '{rdbms,"groonga engine"}'::text[])
 (4 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.out (+3 -3)
===================================================================
--- expected/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.out    2017-07-01 16:43:19 +0900 (245ae2c)
+++ expected/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.out    2017-07-02 21:27:10 +0900 (dddc69e)
@@ -13,16 +13,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
                            QUERY PLAN                           
 ----------------------------------------------------------------
  Index Scan using pgrn_index on memos
-   Index Cond: (content &?> '{rdbms,"groonga engine"}'::text[])
+   Index Cond: (content &?| '{rdbms,"groonga engine"}'::text[])
 (2 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
  id |                 content                  
 ----+------------------------------------------
   2 | Groonga is fast full text search engine.

  Modified: expected/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.out    2017-07-01 16:43:19 +0900 (071b37e)
+++ expected/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.out    2017-07-02 21:27:10 +0900 (8906877)
@@ -10,7 +10,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Copied: expected/full-text-search/text/single/compatibility/v2/query-v2/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/query-v2/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/query-v2/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/similar-v2/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/similar-v2/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/text/single/compatibility/v2/similar-v2/seqscan.out (+1 -5) 90%
===================================================================
--- sql/full-text-search/text/single/similar-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (f44261d)
+++ expected/full-text-search/text/single/compatibility/v2/similar-v2/seqscan.out    2017-07-02 21:27:10 +0900 (3186fc7)
@@ -2,20 +2,16 @@ CREATE TABLE memos (
   id integer,
   content text
 );
-
 INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
 INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
 INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
-
 CREATE INDEX grnindex ON memos
  USING pgroonga (content pgroonga.text_full_text_search_ops_v2);
-
 SET enable_seqscan = on;
 SET enable_indexscan = off;
 SET enable_bitmapscan = off;
-
 SELECT id, content
   FROM memos
  WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
-
+ERROR:  pgroonga: similar search available only in index scan
 DROP TABLE memos;

  Modified: expected/full-text-search/text/single/query-in-v2/bitmapscan.out (+6 -6)
===================================================================
--- expected/full-text-search/text/single/query-in-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (4a7734f)
+++ expected/full-text-search/text/single/query-in-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (e3f90e3)
@@ -13,18 +13,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
-                              QUERY PLAN                              
-----------------------------------------------------------------------
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
+                              QUERY PLAN                               
+-----------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (content &?| '{rdbms,"groonga engine"}'::text[])
+   Recheck Cond: (content &@~| '{rdbms,"groonga engine"}'::text[])
    ->  Bitmap Index Scan on pgrn_index
-         Index Cond: (content &?| '{rdbms,"groonga engine"}'::text[])
+         Index Cond: (content &@~| '{rdbms,"groonga engine"}'::text[])
 (4 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/query-in-v2/indexscan.out (+5 -5)
===================================================================
--- expected/full-text-search/text/single/query-in-v2/indexscan.out    2017-07-01 16:43:19 +0900 (dddc69e)
+++ expected/full-text-search/text/single/query-in-v2/indexscan.out    2017-07-02 21:27:10 +0900 (d868603)
@@ -13,16 +13,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
-                           QUERY PLAN                           
-----------------------------------------------------------------
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
+                           QUERY PLAN                            
+-----------------------------------------------------------------
  Index Scan using pgrn_index on memos
-   Index Cond: (content &?| '{rdbms,"groonga engine"}'::text[])
+   Index Cond: (content &@~| '{rdbms,"groonga engine"}'::text[])
 (2 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
  id |                 content                  
 ----+------------------------------------------
   2 | Groonga is fast full text search engine.

  Modified: expected/full-text-search/text/single/query-in-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text/single/query-in-v2/seqscan.out    2017-07-01 16:43:19 +0900 (8906877)
+++ expected/full-text-search/text/single/query-in-v2/seqscan.out    2017-07-02 21:27:10 +0900 (1699172)
@@ -10,7 +10,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/query-v2/bitmapscan.out (+13 -1)
===================================================================
--- expected/full-text-search/text/single/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (fe45e47)
+++ expected/full-text-search/text/single/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (9b9364c)
@@ -10,9 +10,21 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+                        QUERY PLAN                         
+-----------------------------------------------------------
+ Bitmap Heap Scan on memos
+   Recheck Cond: (content &@~ 'rdbms OR engine'::text)
+   ->  Bitmap Index Scan on grnindex
+         Index Cond: (content &@~ 'rdbms OR engine'::text)
+(4 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/query-v2/indexscan.out (+11 -1)
===================================================================
--- expected/full-text-search/text/single/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (6caf0ef)
+++ expected/full-text-search/text/single/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (dbd130d)
@@ -10,9 +10,19 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+                     QUERY PLAN                      
+-----------------------------------------------------
+ Index Scan using grnindex on memos
+   Index Cond: (content &@~ 'rdbms OR engine'::text)
+(2 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/query-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/text/single/query-v2/seqscan.out    2017-07-01 16:43:19 +0900 (6ccbba1)
+++ expected/full-text-search/text/single/query-v2/seqscan.out    2017-07-02 21:27:10 +0900 (1d0708b)
@@ -13,7 +13,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/text/single/similar-v2/bitmapscan.out (+13 -1)
===================================================================
--- expected/full-text-search/text/single/similar-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (c55ff11)
+++ expected/full-text-search/text/single/similar-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (4e389eb)
@@ -10,9 +10,21 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+                                       QUERY PLAN                                       
+----------------------------------------------------------------------------------------
+ Bitmap Heap Scan on memos
+   Recheck Cond: (content &@* 'Mroonga is a MySQL plugin that uses Groonga.'::text)
+   ->  Bitmap Index Scan on grnindex
+         Index Cond: (content &@* 'Mroonga is a MySQL plugin that uses Groonga.'::text)
+(4 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
  id |                        content                        
 ----+-------------------------------------------------------
   3 | PGroonga is a PostgreSQL extension that uses Groonga.

  Modified: expected/full-text-search/text/single/similar-v2/indexscan.out (+11 -1)
===================================================================
--- expected/full-text-search/text/single/similar-v2/indexscan.out    2017-07-01 16:43:19 +0900 (f594dd5)
+++ expected/full-text-search/text/single/similar-v2/indexscan.out    2017-07-02 21:27:10 +0900 (d0a3b79)
@@ -10,9 +10,19 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+                                    QUERY PLAN                                    
+----------------------------------------------------------------------------------
+ Index Scan using grnindex on memos
+   Index Cond: (content &@* 'Mroonga is a MySQL plugin that uses Groonga.'::text)
+(2 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
  id |                        content                        
 ----+-------------------------------------------------------
   3 | PGroonga is a PostgreSQL extension that uses Groonga.

  Modified: expected/full-text-search/text/single/similar-v2/seqscan.out (+2 -2)
===================================================================
--- expected/full-text-search/text/single/similar-v2/seqscan.out    2017-07-01 16:43:19 +0900 (ecedad9)
+++ expected/full-text-search/text/single/similar-v2/seqscan.out    2017-07-02 21:27:10 +0900 (626a097)
@@ -12,6 +12,6 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
-ERROR:  pgroonga: operator &~? is available only in index scan
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+ERROR:  pgroonga: similar search available only in index scan
 DROP TABLE memos;

  Copied: expected/full-text-search/varchar/compatibility/v1/query-v2-question/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/varchar/compatibility/v1/query-v2-question/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/varchar/compatibility/v1/query-v2-question/seqscan.out (+0 -0) 100%
===================================================================

  Modified: expected/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.out (+13 -1)
===================================================================
--- expected/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (ab95025)
+++ expected/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (28eddad)
@@ -10,9 +10,21 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+                               QUERY PLAN                               
+------------------------------------------------------------------------
+ Bitmap Heap Scan on memos
+   Recheck Cond: (content &@~ 'rdbms OR engine'::character varying)
+   ->  Bitmap Index Scan on grnindex
+         Index Cond: (content &@~ 'rdbms OR engine'::character varying)
+(4 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/compatibility/v1/query-v2/indexscan.out (+11 -1)
===================================================================
--- expected/full-text-search/varchar/compatibility/v1/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (8516491)
+++ expected/full-text-search/varchar/compatibility/v1/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (57bf988)
@@ -10,9 +10,19 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+                            QUERY PLAN                            
+------------------------------------------------------------------
+ Index Scan using grnindex on memos
+   Index Cond: (content &@~ 'rdbms OR engine'::character varying)
+(2 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/compatibility/v1/query-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/varchar/compatibility/v1/query-v2/seqscan.out    2017-07-01 16:43:19 +0900 (831c77e)
+++ expected/full-text-search/varchar/compatibility/v1/query-v2/seqscan.out    2017-07-02 21:27:10 +0900 (e741e75)
@@ -13,7 +13,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Copied: expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/bitmapscan.out (+4 -4) 79%
===================================================================
--- expected/full-text-search/varchar/query-in-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (e778d1c)
+++ expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/bitmapscan.out    2017-07-02 21:27:10 +0900 (46b5716)
@@ -13,18 +13,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &?> Array['rdbms', 'groonga engine']::varchar[];
                                     QUERY PLAN                                     
 -----------------------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (content &?| '{rdbms,"groonga engine"}'::character varying[])
+   Recheck Cond: (content &?> '{rdbms,"groonga engine"}'::character varying[])
    ->  Bitmap Index Scan on pgrn_index
-         Index Cond: (content &?| '{rdbms,"groonga engine"}'::character varying[])
+         Index Cond: (content &?> '{rdbms,"groonga engine"}'::character varying[])
 (4 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &?> Array['rdbms', 'groonga engine']::varchar[];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Copied: expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/indexscan.out (+3 -3) 83%
===================================================================
--- expected/full-text-search/varchar/query-in-v2/indexscan.out    2017-07-01 16:43:19 +0900 (8d28603)
+++ expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/indexscan.out    2017-07-02 21:27:10 +0900 (9bcc3d6)
@@ -13,16 +13,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &?> Array['rdbms', 'groonga engine']::varchar[];
                                  QUERY PLAN                                  
 -----------------------------------------------------------------------------
  Index Scan using pgrn_index on memos
-   Index Cond: (content &?| '{rdbms,"groonga engine"}'::character varying[])
+   Index Cond: (content &?> '{rdbms,"groonga engine"}'::character varying[])
 (2 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &?> Array['rdbms', 'groonga engine']::varchar[];
  id |                 content                  
 ----+------------------------------------------
   2 | Groonga is fast full text search engine.

  Copied: expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/seqscan.out (+1 -1) 90%
===================================================================
--- expected/full-text-search/varchar/query-in-v2/seqscan.out    2017-07-01 16:43:19 +0900 (77b80a3)
+++ expected/full-text-search/varchar/compatibility/v2/query-in-v2-greater/seqscan.out    2017-07-02 21:27:10 +0900 (0e3cbf3)
@@ -10,7 +10,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &?> Array['rdbms', 'groonga engine']::varchar[];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Copied: expected/full-text-search/varchar/compatibility/v2/query-in-v2/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/varchar/compatibility/v2/query-in-v2/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/varchar/compatibility/v2/query-in-v2/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/varchar/compatibility/v2/query-v2/bitmapscan.out (+6 -6) 68%
===================================================================
--- expected/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (09d1a76)
+++ expected/full-text-search/varchar/compatibility/v2/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (d262b24)
@@ -1,12 +1,12 @@
 CREATE TABLE memos (
   id integer,
-  content text
+  content varchar(256)
 );
 INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
 INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
 INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
 CREATE INDEX grnindex ON memos
- USING pgroonga (content pgroonga.text_full_text_search_ops);
+ USING pgroonga (content pgroonga.varchar_full_text_search_ops_v2);
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
@@ -14,12 +14,12 @@ EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
  WHERE content &? 'rdbms OR engine';
-                        QUERY PLAN                        
-----------------------------------------------------------
+                              QUERY PLAN                               
+-----------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (content &? 'rdbms OR engine'::text)
+   Recheck Cond: (content &? 'rdbms OR engine'::character varying)
    ->  Bitmap Index Scan on grnindex
-         Index Cond: (content &? 'rdbms OR engine'::text)
+         Index Cond: (content &? 'rdbms OR engine'::character varying)
 (4 rows)
 
 SELECT id, content

  Copied: expected/full-text-search/varchar/compatibility/v2/query-v2/indexscan.out (+5 -5) 72%
===================================================================
--- expected/full-text-search/text/single/compatibility/v1/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (ac40d2c)
+++ expected/full-text-search/varchar/compatibility/v2/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (3772066)
@@ -1,12 +1,12 @@
 CREATE TABLE memos (
   id integer,
-  content text
+  content varchar(256)
 );
 INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
 INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
 INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
 CREATE INDEX grnindex ON memos
- USING pgroonga (content pgroonga.text_full_text_search_ops);
+ USING pgroonga (content pgroonga.varchar_full_text_search_ops_v2);
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
@@ -14,10 +14,10 @@ EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
  WHERE content &? 'rdbms OR engine';
-                     QUERY PLAN                     
-----------------------------------------------------
+                           QUERY PLAN                            
+-----------------------------------------------------------------
  Index Scan using grnindex on memos
-   Index Cond: (content &? 'rdbms OR engine'::text)
+   Index Cond: (content &? 'rdbms OR engine'::character varying)
 (2 rows)
 
 SELECT id, content

  Copied: expected/full-text-search/varchar/compatibility/v2/query-v2/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/full-text-search/varchar/compatibility/v2/similar-v2/bitmapscan.out (+12 -0) 56%
===================================================================
--- expected/full-text-search/varchar/similar-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (4496152)
+++ expected/full-text-search/varchar/compatibility/v2/similar-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (f509319)
@@ -10,6 +10,18 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
+EXPLAIN (COSTS OFF)
+SELECT id, content
+  FROM memos
+ WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+                                             QUERY PLAN                                              
+-----------------------------------------------------------------------------------------------------
+ Bitmap Heap Scan on memos
+   Recheck Cond: (content &~? 'Mroonga is a MySQL plugin that uses Groonga.'::character varying)
+   ->  Bitmap Index Scan on grnindex
+         Index Cond: (content &~? 'Mroonga is a MySQL plugin that uses Groonga.'::character varying)
+(4 rows)
+
 SELECT id, content
   FROM memos
  WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';

  Copied: expected/full-text-search/varchar/compatibility/v2/similar-v2/indexscan.out (+10 -0) 62%
===================================================================
--- expected/full-text-search/varchar/similar-v2/indexscan.out    2017-07-01 16:43:19 +0900 (6002920)
+++ expected/full-text-search/varchar/compatibility/v2/similar-v2/indexscan.out    2017-07-02 21:27:10 +0900 (acc9eb1)
@@ -10,6 +10,16 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
+EXPLAIN (COSTS OFF)
+SELECT id, content
+  FROM memos
+ WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+                                          QUERY PLAN                                           
+-----------------------------------------------------------------------------------------------
+ Index Scan using grnindex on memos
+   Index Cond: (content &~? 'Mroonga is a MySQL plugin that uses Groonga.'::character varying)
+(2 rows)
+
 SELECT id, content
   FROM memos
  WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';

  Copied: expected/full-text-search/varchar/compatibility/v2/similar-v2/seqscan.out (+1 -5) 90%
===================================================================
--- sql/full-text-search/varchar/similar-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (7b489a1)
+++ expected/full-text-search/varchar/compatibility/v2/similar-v2/seqscan.out    2017-07-02 21:27:10 +0900 (07c98a6)
@@ -2,20 +2,16 @@ CREATE TABLE memos (
   id integer,
   content varchar(256)
 );
-
 INSERT INTO memos VALUES (1, 'PostgreSQL is a RDBMS.');
 INSERT INTO memos VALUES (2, 'Groonga is fast full text search engine.');
 INSERT INTO memos VALUES (3, 'PGroonga is a PostgreSQL extension that uses Groonga.');
-
 CREATE INDEX grnindex ON memos
  USING pgroonga (content pgroonga.varchar_full_text_search_ops_v2);
-
 SET enable_seqscan = on;
 SET enable_indexscan = off;
 SET enable_bitmapscan = off;
-
 SELECT id, content
   FROM memos
  WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
-
+ERROR:  pgroonga: similar search is available only in index scan
 DROP TABLE memos;

  Modified: expected/full-text-search/varchar/query-in-v2/bitmapscan.out (+6 -6)
===================================================================
--- expected/full-text-search/varchar/query-in-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (e778d1c)
+++ expected/full-text-search/varchar/query-in-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (a94de91)
@@ -13,18 +13,18 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
-                                    QUERY PLAN                                     
------------------------------------------------------------------------------------
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
+                                     QUERY PLAN                                     
+------------------------------------------------------------------------------------
  Bitmap Heap Scan on memos
-   Recheck Cond: (content &?| '{rdbms,"groonga engine"}'::character varying[])
+   Recheck Cond: (content &@~| '{rdbms,"groonga engine"}'::character varying[])
    ->  Bitmap Index Scan on pgrn_index
-         Index Cond: (content &?| '{rdbms,"groonga engine"}'::character varying[])
+         Index Cond: (content &@~| '{rdbms,"groonga engine"}'::character varying[])
 (4 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/query-in-v2/indexscan.out (+5 -5)
===================================================================
--- expected/full-text-search/varchar/query-in-v2/indexscan.out    2017-07-01 16:43:19 +0900 (8d28603)
+++ expected/full-text-search/varchar/query-in-v2/indexscan.out    2017-07-02 21:27:10 +0900 (804ab96)
@@ -13,16 +13,16 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
-                                 QUERY PLAN                                  
------------------------------------------------------------------------------
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
+                                  QUERY PLAN                                  
+------------------------------------------------------------------------------
  Index Scan using pgrn_index on memos
-   Index Cond: (content &?| '{rdbms,"groonga engine"}'::character varying[])
+   Index Cond: (content &@~| '{rdbms,"groonga engine"}'::character varying[])
 (2 rows)
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
  id |                 content                  
 ----+------------------------------------------
   2 | Groonga is fast full text search engine.

  Modified: expected/full-text-search/varchar/query-in-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/varchar/query-in-v2/seqscan.out    2017-07-01 16:43:19 +0900 (77b80a3)
+++ expected/full-text-search/varchar/query-in-v2/seqscan.out    2017-07-02 21:27:10 +0900 (7438e10)
@@ -10,7 +10,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/query-v2/bitmapscan.out (+13 -1)
===================================================================
--- expected/full-text-search/varchar/query-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (77ac274)
+++ expected/full-text-search/varchar/query-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (eea8239)
@@ -10,9 +10,21 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+                               QUERY PLAN                               
+------------------------------------------------------------------------
+ Bitmap Heap Scan on memos
+   Recheck Cond: (content &@~ 'rdbms OR engine'::character varying)
+   ->  Bitmap Index Scan on grnindex
+         Index Cond: (content &@~ 'rdbms OR engine'::character varying)
+(4 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/query-v2/indexscan.out (+11 -1)
===================================================================
--- expected/full-text-search/varchar/query-v2/indexscan.out    2017-07-01 16:43:19 +0900 (89f46a2)
+++ expected/full-text-search/varchar/query-v2/indexscan.out    2017-07-02 21:27:10 +0900 (6880745)
@@ -10,9 +10,19 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+                            QUERY PLAN                            
+------------------------------------------------------------------
+ Index Scan using grnindex on memos
+   Index Cond: (content &@~ 'rdbms OR engine'::character varying)
+(2 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/query-v2/seqscan.out (+1 -1)
===================================================================
--- expected/full-text-search/varchar/query-v2/seqscan.out    2017-07-01 16:43:19 +0900 (280d1ab)
+++ expected/full-text-search/varchar/query-v2/seqscan.out    2017-07-02 21:27:10 +0900 (2f125b9)
@@ -13,7 +13,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
  id |                 content                  
 ----+------------------------------------------
   1 | PostgreSQL is a RDBMS.

  Modified: expected/full-text-search/varchar/similar-v2/bitmapscan.out (+13 -1)
===================================================================
--- expected/full-text-search/varchar/similar-v2/bitmapscan.out    2017-07-01 16:43:19 +0900 (4496152)
+++ expected/full-text-search/varchar/similar-v2/bitmapscan.out    2017-07-02 21:27:10 +0900 (9f016a6)
@@ -10,9 +10,21 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+                                             QUERY PLAN                                              
+-----------------------------------------------------------------------------------------------------
+ Bitmap Heap Scan on memos
+   Recheck Cond: (content &@* 'Mroonga is a MySQL plugin that uses Groonga.'::character varying)
+   ->  Bitmap Index Scan on grnindex
+         Index Cond: (content &@* 'Mroonga is a MySQL plugin that uses Groonga.'::character varying)
+(4 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
  id |                        content                        
 ----+-------------------------------------------------------
   3 | PGroonga is a PostgreSQL extension that uses Groonga.

  Modified: expected/full-text-search/varchar/similar-v2/indexscan.out (+11 -1)
===================================================================
--- expected/full-text-search/varchar/similar-v2/indexscan.out    2017-07-01 16:43:19 +0900 (6002920)
+++ expected/full-text-search/varchar/similar-v2/indexscan.out    2017-07-02 21:27:10 +0900 (977c971)
@@ -10,9 +10,19 @@ CREATE INDEX grnindex ON memos
 SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+                                          QUERY PLAN                                           
+-----------------------------------------------------------------------------------------------
+ Index Scan using grnindex on memos
+   Index Cond: (content &@* 'Mroonga is a MySQL plugin that uses Groonga.'::character varying)
+(2 rows)
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
  id |                        content                        
 ----+-------------------------------------------------------
   3 | PGroonga is a PostgreSQL extension that uses Groonga.

  Modified: expected/full-text-search/varchar/similar-v2/seqscan.out (+2 -2)
===================================================================
--- expected/full-text-search/varchar/similar-v2/seqscan.out    2017-07-01 16:43:19 +0900 (a754ac4)
+++ expected/full-text-search/varchar/similar-v2/seqscan.out    2017-07-02 21:27:10 +0900 (d9b7da6)
@@ -12,6 +12,6 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
-ERROR:  pgroonga: operator &~? is available only in index scan
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+ERROR:  pgroonga: similar search is available only in index scan
 DROP TABLE memos;

  Copied: expected/jsonb/compatibility/v1/query-v2-question/element/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v1/query-v2-question/element/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v1/query-v2-question/element/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v1/query-v2-question/value/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v1/query-v2-question/value/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v1/query-v2-question/value/seqscan.out (+0 -0) 100%
===================================================================

  Modified: expected/jsonb/compatibility/v1/query-v2/element/bitmapscan.out (+6 -6)
===================================================================
--- expected/jsonb/compatibility/v1/query-v2/element/bitmapscan.out    2017-07-01 16:43:19 +0900 (b558489)
+++ expected/jsonb/compatibility/v1/query-v2/element/bitmapscan.out    2017-07-02 21:27:10 +0900 (61ca850)
@@ -13,21 +13,21 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
-                          QUERY PLAN                          
---------------------------------------------------------------
+                          QUERY PLAN                           
+---------------------------------------------------------------
  Sort
    Sort Key: id
    ->  Bitmap Heap Scan on fruits
-         Recheck Cond: (items &? 'banana OR peach'::text)
+         Recheck Cond: (items &@~ 'banana OR peach'::text)
          ->  Bitmap Index Scan on pgroonga_index
-               Index Cond: (items &? 'banana OR peach'::text)
+               Index Cond: (items &@~ 'banana OR peach'::text)
 (6 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
  id |        items        
 ----+---------------------

  Modified: expected/jsonb/compatibility/v1/query-v2/element/indexscan.out (+5 -5)
===================================================================
--- expected/jsonb/compatibility/v1/query-v2/element/indexscan.out    2017-07-01 16:43:19 +0900 (ac29df1)
+++ expected/jsonb/compatibility/v1/query-v2/element/indexscan.out    2017-07-02 21:27:10 +0900 (01a0041)
@@ -13,19 +13,19 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
-                       QUERY PLAN                       
---------------------------------------------------------
+                       QUERY PLAN                        
+---------------------------------------------------------
  Sort
    Sort Key: id
    ->  Index Scan using pgroonga_index on fruits
-         Index Cond: (items &? 'banana OR peach'::text)
+         Index Cond: (items &@~ 'banana OR peach'::text)
 (4 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
  id |        items        
 ----+---------------------

  Modified: expected/jsonb/compatibility/v1/query-v2/element/seqscan.out (+1 -1)
===================================================================
--- expected/jsonb/compatibility/v1/query-v2/element/seqscan.out    2017-07-01 16:43:19 +0900 (da01d1d)
+++ expected/jsonb/compatibility/v1/query-v2/element/seqscan.out    2017-07-02 21:27:10 +0900 (0ff7fbb)
@@ -10,7 +10,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
  id |        items        
 ----+---------------------

  Modified: expected/jsonb/compatibility/v1/query-v2/value/bitmapscan.out (+6 -6)
===================================================================
--- expected/jsonb/compatibility/v1/query-v2/value/bitmapscan.out    2017-07-01 16:43:19 +0900 (267a508)
+++ expected/jsonb/compatibility/v1/query-v2/value/bitmapscan.out    2017-07-02 21:27:10 +0900 (bef1c16)
@@ -14,21 +14,21 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
-                          QUERY PLAN                          
---------------------------------------------------------------
+                          QUERY PLAN                           
+---------------------------------------------------------------
  Sort
    Sort Key: id
    ->  Bitmap Heap Scan on fruits
-         Recheck Cond: (items &? 'apple OR banana'::text)
+         Recheck Cond: (items &@~ 'apple OR banana'::text)
          ->  Bitmap Index Scan on pgroonga_index
-               Index Cond: (items &? 'apple OR banana'::text)
+               Index Cond: (items &@~ 'apple OR banana'::text)
 (6 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
  id |       items        
 ----+--------------------

  Modified: expected/jsonb/compatibility/v1/query-v2/value/indexscan.out (+5 -5)
===================================================================
--- expected/jsonb/compatibility/v1/query-v2/value/indexscan.out    2017-07-01 16:43:19 +0900 (5777897)
+++ expected/jsonb/compatibility/v1/query-v2/value/indexscan.out    2017-07-02 21:27:10 +0900 (835886e)
@@ -14,19 +14,19 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
-                       QUERY PLAN                       
---------------------------------------------------------
+                       QUERY PLAN                        
+---------------------------------------------------------
  Sort
    Sort Key: id
    ->  Index Scan using pgroonga_index on fruits
-         Index Cond: (items &? 'apple OR banana'::text)
+         Index Cond: (items &@~ 'apple OR banana'::text)
 (4 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
  id |       items        
 ----+--------------------

  Modified: expected/jsonb/compatibility/v1/query-v2/value/seqscan.out (+1 -1)
===================================================================
--- expected/jsonb/compatibility/v1/query-v2/value/seqscan.out    2017-07-01 16:43:19 +0900 (2cab725)
+++ expected/jsonb/compatibility/v1/query-v2/value/seqscan.out    2017-07-02 21:27:10 +0900 (3920467)
@@ -11,7 +11,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
  id |       items        
 ----+--------------------

  Copied: expected/jsonb/compatibility/v2/query-v2/element/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v2/query-v2/element/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v2/query-v2/element/seqscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v2/query-v2/value/bitmapscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v2/query-v2/value/indexscan.out (+0 -0) 100%
===================================================================

  Copied: expected/jsonb/compatibility/v2/query-v2/value/seqscan.out (+0 -0) 100%
===================================================================

  Modified: expected/jsonb/query-v2/element/bitmapscan.out (+6 -6)
===================================================================
--- expected/jsonb/query-v2/element/bitmapscan.out    2017-07-01 16:43:19 +0900 (943df62)
+++ expected/jsonb/query-v2/element/bitmapscan.out    2017-07-02 21:27:10 +0900 (220309b)
@@ -13,21 +13,21 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
-                          QUERY PLAN                          
---------------------------------------------------------------
+                          QUERY PLAN                           
+---------------------------------------------------------------
  Sort
    Sort Key: id
    ->  Bitmap Heap Scan on fruits
-         Recheck Cond: (items &? 'banana OR peach'::text)
+         Recheck Cond: (items &@~ 'banana OR peach'::text)
          ->  Bitmap Index Scan on pgroonga_index
-               Index Cond: (items &? 'banana OR peach'::text)
+               Index Cond: (items &@~ 'banana OR peach'::text)
 (6 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
  id |        items        
 ----+---------------------

  Modified: expected/jsonb/query-v2/element/indexscan.out (+5 -5)
===================================================================
--- expected/jsonb/query-v2/element/indexscan.out    2017-07-01 16:43:19 +0900 (6f3ddac)
+++ expected/jsonb/query-v2/element/indexscan.out    2017-07-02 21:27:10 +0900 (36d8d7e)
@@ -13,19 +13,19 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
-                       QUERY PLAN                       
---------------------------------------------------------
+                       QUERY PLAN                        
+---------------------------------------------------------
  Sort
    Sort Key: id
    ->  Index Scan using pgroonga_index on fruits
-         Index Cond: (items &? 'banana OR peach'::text)
+         Index Cond: (items &@~ 'banana OR peach'::text)
 (4 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
  id |        items        
 ----+---------------------

  Modified: expected/jsonb/query-v2/element/seqscan.out (+1 -1)
===================================================================
--- expected/jsonb/query-v2/element/seqscan.out    2017-07-01 16:43:19 +0900 (da01d1d)
+++ expected/jsonb/query-v2/element/seqscan.out    2017-07-02 21:27:10 +0900 (0ff7fbb)
@@ -10,7 +10,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
  id |        items        
 ----+---------------------

  Modified: expected/jsonb/query-v2/value/bitmapscan.out (+6 -6)
===================================================================
--- expected/jsonb/query-v2/value/bitmapscan.out    2017-07-01 16:43:19 +0900 (0bd4889)
+++ expected/jsonb/query-v2/value/bitmapscan.out    2017-07-02 21:27:10 +0900 (5979d59)
@@ -14,21 +14,21 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
-                          QUERY PLAN                          
---------------------------------------------------------------
+                          QUERY PLAN                           
+---------------------------------------------------------------
  Sort
    Sort Key: id
    ->  Bitmap Heap Scan on fruits
-         Recheck Cond: (items &? 'apple OR banana'::text)
+         Recheck Cond: (items &@~ 'apple OR banana'::text)
          ->  Bitmap Index Scan on pgroonga_index
-               Index Cond: (items &? 'apple OR banana'::text)
+               Index Cond: (items &@~ 'apple OR banana'::text)
 (6 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
  id |       items        
 ----+--------------------

  Modified: expected/jsonb/query-v2/value/indexscan.out (+5 -5)
===================================================================
--- expected/jsonb/query-v2/value/indexscan.out    2017-07-01 16:43:19 +0900 (1a6ec71)
+++ expected/jsonb/query-v2/value/indexscan.out    2017-07-02 21:27:10 +0900 (f9d5bf5)
@@ -14,19 +14,19 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
-                       QUERY PLAN                       
---------------------------------------------------------
+                       QUERY PLAN                        
+---------------------------------------------------------
  Sort
    Sort Key: id
    ->  Index Scan using pgroonga_index on fruits
-         Index Cond: (items &? 'apple OR banana'::text)
+         Index Cond: (items &@~ 'apple OR banana'::text)
 (4 rows)
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
  id |       items        
 ----+--------------------

  Modified: expected/jsonb/query-v2/value/seqscan.out (+1 -1)
===================================================================
--- expected/jsonb/query-v2/value/seqscan.out    2017-07-01 16:43:19 +0900 (2cab725)
+++ expected/jsonb/query-v2/value/seqscan.out    2017-07-02 21:27:10 +0900 (3920467)
@@ -11,7 +11,7 @@ SET enable_indexscan = off;
 SET enable_bitmapscan = off;
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
  id |       items        
 ----+--------------------

  Copied: sql/full-text-search/text-array/compatibility/v1/query-v2-question/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v1/query-v2-question/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v1/query-v2-question/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (3a1a294)
+++ sql/full-text-search/text-array/compatibility/v1/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (db434fe)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/compatibility/v1/query-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/compatibility/v1/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (6574103)
+++ sql/full-text-search/text-array/compatibility/v1/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (d994e63)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/compatibility/v1/query-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text-array/compatibility/v1/query-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (e399c31)
+++ sql/full-text-search/text-array/compatibility/v1/query-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (f1dc349)
@@ -24,6 +24,6 @@ SET enable_bitmapscan = off;
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Copied: sql/full-text-search/text-array/compatibility/v2/query-in-v2/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/query-in-v2/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/query-in-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/query-v2/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/query-v2/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/query-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/similar-v2/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/similar-v2/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text-array/compatibility/v2/similar-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/text-array/query-in-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/query-in-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (753b299)
+++ sql/full-text-search/text-array/query-in-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (0233b01)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/query-in-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/query-in-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (bcffcd2)
+++ sql/full-text-search/text-array/query-in-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (36fc08e)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/query-in-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text-array/query-in-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (5c8eac9)
+++ sql/full-text-search/text-array/query-in-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (e0f9f5f)
@@ -24,6 +24,6 @@ SET enable_bitmapscan = off;
 
 SELECT title, contents
   FROM memos
- WHERE contents &?| Array['rdbms', 'groonga engine'];
+ WHERE contents &@~| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/query-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (d7a7907)
+++ sql/full-text-search/text-array/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (29e9d2d)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/query-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (e0fa59d)
+++ sql/full-text-search/text-array/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (7b5a567)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/query-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text-array/query-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (57c1d08)
+++ sql/full-text-search/text-array/query-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (fa19c8e)
@@ -24,6 +24,6 @@ SET enable_bitmapscan = off;
 
 SELECT title, contents
   FROM memos
- WHERE contents &? 'rdbms OR engine';
+ WHERE contents &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/similar-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/similar-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (efcdace)
+++ sql/full-text-search/text-array/similar-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (ae49c2e)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/similar-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text-array/similar-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (0e9f22a)
+++ sql/full-text-search/text-array/similar-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (e6a66d7)
@@ -25,10 +25,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text-array/similar-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text-array/similar-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (be79ea4)
+++ sql/full-text-search/text-array/similar-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (739a9cb)
@@ -24,6 +24,6 @@ SET enable_bitmapscan = off;
 
 SELECT title, contents
   FROM memos
- WHERE contents &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE contents &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Copied: sql/full-text-search/text/single/compatibility/v1/query-v2-question/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v1/query-v2-question/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v1/query-v2-question/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (ac40485)
+++ sql/full-text-search/text/single/compatibility/v1/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (6679e4a)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (20b06c6)
+++ sql/full-text-search/text/single/compatibility/v1/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (5209301)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (e0ade33)
+++ sql/full-text-search/text/single/compatibility/v1/query-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (ee171e5)
@@ -18,6 +18,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Copied: sql/full-text-search/text/single/compatibility/v2/query-in-v2-greater/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/query-in-v2-greater/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/query-in-v2-greater/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (d8a732a)
+++ sql/full-text-search/text/single/compatibility/v2/query-in-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (79c9345)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
 
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (9e867c2)
+++ sql/full-text-search/text/single/compatibility/v2/query-in-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (e73b601)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
 
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (14d34bb)
+++ sql/full-text-search/text/single/compatibility/v2/query-in-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (86f270e)
@@ -13,6 +13,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &?> Array['rdbms', 'groonga engine'];
+ WHERE content &?| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Copied: sql/full-text-search/text/single/compatibility/v2/query-v2/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/query-v2/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/query-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/similar-v2/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/similar-v2/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/text/single/compatibility/v2/similar-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/text/single/query-in-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text/single/query-in-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (79c9345)
+++ sql/full-text-search/text/single/query-in-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (4d47ae0)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/query-in-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/text/single/query-in-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (e73b601)
+++ sql/full-text-search/text/single/query-in-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (a7b0f3d)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/query-in-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text/single/query-in-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (86f270e)
+++ sql/full-text-search/text/single/query-in-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (7f34bc2)
@@ -13,6 +13,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine'];
+ WHERE content &@~| Array['rdbms', 'groonga engine'];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/query-v2/bitmapscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/text/single/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (d321b33)
+++ sql/full-text-search/text/single/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (57c4050)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/query-v2/indexscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/text/single/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (aa2c7af)
+++ sql/full-text-search/text/single/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (46f6bf3)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/query-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text/single/query-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (a2d3f6c)
+++ sql/full-text-search/text/single/query-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (c8afd6c)
@@ -18,6 +18,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/similar-v2/bitmapscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/text/single/similar-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (0bf8463)
+++ sql/full-text-search/text/single/similar-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (f8668a2)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/similar-v2/indexscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/text/single/similar-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (9c8c9ff)
+++ sql/full-text-search/text/single/similar-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (be78553)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/text/single/similar-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/text/single/similar-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (f44261d)
+++ sql/full-text-search/text/single/similar-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (2dba6d4)
@@ -16,6 +16,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Copied: sql/full-text-search/varchar/compatibility/v1/query-v2-question/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/varchar/compatibility/v1/query-v2-question/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/varchar/compatibility/v1/query-v2-question/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (f8d54ce)
+++ sql/full-text-search/varchar/compatibility/v1/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (12b14c5)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/compatibility/v1/query-v2/indexscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/varchar/compatibility/v1/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (59eb473)
+++ sql/full-text-search/varchar/compatibility/v1/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (dbcc575)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/compatibility/v1/query-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/varchar/compatibility/v1/query-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (d9a1ca9)
+++ sql/full-text-search/varchar/compatibility/v1/query-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (78526be)
@@ -18,6 +18,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Copied: sql/full-text-search/varchar/compatibility/v2/query-in-v2/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/varchar/compatibility/v2/query-in-v2/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/varchar/compatibility/v2/query-in-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/varchar/compatibility/v2/query-v2/bitmapscan.sql (+5 -0) 85%
===================================================================
--- sql/full-text-search/varchar/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (ea6bd0f)
+++ sql/full-text-search/varchar/compatibility/v2/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (313cd81)
@@ -14,6 +14,11 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
+SELECT id, content
+  FROM memos
+ WHERE content &? 'rdbms OR engine';
+
 SELECT id, content
   FROM memos
  WHERE content &? 'rdbms OR engine';

  Copied: sql/full-text-search/varchar/compatibility/v2/query-v2/indexscan.sql (+5 -0) 85%
===================================================================
--- sql/full-text-search/varchar/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (bbfb7eb)
+++ sql/full-text-search/varchar/compatibility/v2/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (caccdc9)
@@ -14,6 +14,11 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
+SELECT id, content
+  FROM memos
+ WHERE content &? 'rdbms OR engine';
+
 SELECT id, content
   FROM memos
  WHERE content &? 'rdbms OR engine';

  Copied: sql/full-text-search/varchar/compatibility/v2/query-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/full-text-search/varchar/compatibility/v2/similar-v2/bitmapscan.sql (+5 -0) 82%
===================================================================
--- sql/full-text-search/varchar/similar-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (659d8bf)
+++ sql/full-text-search/varchar/compatibility/v2/similar-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (7a9b701)
@@ -14,6 +14,11 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
+SELECT id, content
+  FROM memos
+ WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+
 SELECT id, content
   FROM memos
  WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';

  Copied: sql/full-text-search/varchar/compatibility/v2/similar-v2/indexscan.sql (+5 -0) 82%
===================================================================
--- sql/full-text-search/varchar/similar-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (890ab2b)
+++ sql/full-text-search/varchar/compatibility/v2/similar-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (7ba9c18)
@@ -14,6 +14,11 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
+SELECT id, content
+  FROM memos
+ WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+
 SELECT id, content
   FROM memos
  WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';

  Copied: sql/full-text-search/varchar/compatibility/v2/similar-v2/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/full-text-search/varchar/query-in-v2/bitmapscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/varchar/query-in-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (82394a3)
+++ sql/full-text-search/varchar/query-in-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (baffd4d)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/query-in-v2/indexscan.sql (+2 -2)
===================================================================
--- sql/full-text-search/varchar/query-in-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (5b6eccb)
+++ sql/full-text-search/varchar/query-in-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (04fffc3)
@@ -17,10 +17,10 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/query-in-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/varchar/query-in-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (e5a43a4)
+++ sql/full-text-search/varchar/query-in-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (6a7ebed)
@@ -13,6 +13,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &?| Array['rdbms', 'groonga engine']::varchar[];
+ WHERE content &@~| Array['rdbms', 'groonga engine']::varchar[];
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/query-v2/bitmapscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/varchar/query-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (ea6bd0f)
+++ sql/full-text-search/varchar/query-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (f6e6544)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/query-v2/indexscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/varchar/query-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (bbfb7eb)
+++ sql/full-text-search/varchar/query-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (2defc35)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/query-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/varchar/query-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (cc9b455)
+++ sql/full-text-search/varchar/query-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (c9d27a0)
@@ -18,6 +18,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &? 'rdbms OR engine';
+ WHERE content &@~ 'rdbms OR engine';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/similar-v2/bitmapscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/varchar/similar-v2/bitmapscan.sql    2017-07-01 16:43:19 +0900 (659d8bf)
+++ sql/full-text-search/varchar/similar-v2/bitmapscan.sql    2017-07-02 21:27:10 +0900 (9b24ad9)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = off;
 SET enable_bitmapscan = on;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/similar-v2/indexscan.sql (+6 -1)
===================================================================
--- sql/full-text-search/varchar/similar-v2/indexscan.sql    2017-07-01 16:43:19 +0900 (890ab2b)
+++ sql/full-text-search/varchar/similar-v2/indexscan.sql    2017-07-02 21:27:10 +0900 (05038de)
@@ -14,8 +14,13 @@ SET enable_seqscan = off;
 SET enable_indexscan = on;
 SET enable_bitmapscan = off;
 
+EXPLAIN (COSTS OFF)
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
+
+SELECT id, content
+  FROM memos
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Modified: sql/full-text-search/varchar/similar-v2/seqscan.sql (+1 -1)
===================================================================
--- sql/full-text-search/varchar/similar-v2/seqscan.sql    2017-07-01 16:43:19 +0900 (7b489a1)
+++ sql/full-text-search/varchar/similar-v2/seqscan.sql    2017-07-02 21:27:10 +0900 (a3255ee)
@@ -16,6 +16,6 @@ SET enable_bitmapscan = off;
 
 SELECT id, content
   FROM memos
- WHERE content &~? 'Mroonga is a MySQL plugin that uses Groonga.';
+ WHERE content &@* 'Mroonga is a MySQL plugin that uses Groonga.';
 
 DROP TABLE memos;

  Copied: sql/jsonb/compatibility/v1/query-v2-question/element/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v1/query-v2-question/element/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v1/query-v2-question/element/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v1/query-v2-question/value/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v1/query-v2-question/value/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v1/query-v2-question/value/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/jsonb/compatibility/v1/query-v2/element/bitmapscan.sql (+2 -2)
===================================================================
--- sql/jsonb/compatibility/v1/query-v2/element/bitmapscan.sql    2017-07-01 16:43:19 +0900 (20ea531)
+++ sql/jsonb/compatibility/v1/query-v2/element/bitmapscan.sql    2017-07-02 21:27:10 +0900 (97fd607)
@@ -17,12 +17,12 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/compatibility/v1/query-v2/element/indexscan.sql (+2 -2)
===================================================================
--- sql/jsonb/compatibility/v1/query-v2/element/indexscan.sql    2017-07-01 16:43:19 +0900 (1b1e4b4)
+++ sql/jsonb/compatibility/v1/query-v2/element/indexscan.sql    2017-07-02 21:27:10 +0900 (e140e78)
@@ -17,12 +17,12 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/compatibility/v1/query-v2/element/seqscan.sql (+1 -1)
===================================================================
--- sql/jsonb/compatibility/v1/query-v2/element/seqscan.sql    2017-07-01 16:43:19 +0900 (50f0642)
+++ sql/jsonb/compatibility/v1/query-v2/element/seqscan.sql    2017-07-02 21:27:10 +0900 (4fbedca)
@@ -13,7 +13,7 @@ SET enable_bitmapscan = off;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/compatibility/v1/query-v2/value/bitmapscan.sql (+2 -2)
===================================================================
--- sql/jsonb/compatibility/v1/query-v2/value/bitmapscan.sql    2017-07-01 16:43:19 +0900 (b731d76)
+++ sql/jsonb/compatibility/v1/query-v2/value/bitmapscan.sql    2017-07-02 21:27:10 +0900 (c94ba4e)
@@ -18,12 +18,12 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/compatibility/v1/query-v2/value/indexscan.sql (+2 -2)
===================================================================
--- sql/jsonb/compatibility/v1/query-v2/value/indexscan.sql    2017-07-01 16:43:19 +0900 (0a090ef)
+++ sql/jsonb/compatibility/v1/query-v2/value/indexscan.sql    2017-07-02 21:27:10 +0900 (aa49081)
@@ -18,12 +18,12 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/compatibility/v1/query-v2/value/seqscan.sql (+1 -1)
===================================================================
--- sql/jsonb/compatibility/v1/query-v2/value/seqscan.sql    2017-07-01 16:43:19 +0900 (4d277ab)
+++ sql/jsonb/compatibility/v1/query-v2/value/seqscan.sql    2017-07-02 21:27:10 +0900 (4cacf5e)
@@ -14,7 +14,7 @@ SET enable_bitmapscan = off;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 DROP TABLE fruits;

  Copied: sql/jsonb/compatibility/v2/query-v2/element/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v2/query-v2/element/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v2/query-v2/element/seqscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v2/query-v2/value/bitmapscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v2/query-v2/value/indexscan.sql (+0 -0) 100%
===================================================================

  Copied: sql/jsonb/compatibility/v2/query-v2/value/seqscan.sql (+0 -0) 100%
===================================================================

  Modified: sql/jsonb/query-v2/element/bitmapscan.sql (+2 -2)
===================================================================
--- sql/jsonb/query-v2/element/bitmapscan.sql    2017-07-01 16:43:19 +0900 (086addd)
+++ sql/jsonb/query-v2/element/bitmapscan.sql    2017-07-02 21:27:10 +0900 (ee607c3)
@@ -17,12 +17,12 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/query-v2/element/indexscan.sql (+2 -2)
===================================================================
--- sql/jsonb/query-v2/element/indexscan.sql    2017-07-01 16:43:19 +0900 (f049788)
+++ sql/jsonb/query-v2/element/indexscan.sql    2017-07-02 21:27:10 +0900 (1a025d3)
@@ -17,12 +17,12 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/query-v2/element/seqscan.sql (+1 -1)
===================================================================
--- sql/jsonb/query-v2/element/seqscan.sql    2017-07-01 16:43:19 +0900 (50f0642)
+++ sql/jsonb/query-v2/element/seqscan.sql    2017-07-02 21:27:10 +0900 (4fbedca)
@@ -13,7 +13,7 @@ SET enable_bitmapscan = off;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'banana OR peach'
+ WHERE items &@~ 'banana OR peach'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/query-v2/value/bitmapscan.sql (+2 -2)
===================================================================
--- sql/jsonb/query-v2/value/bitmapscan.sql    2017-07-01 16:43:19 +0900 (bb950de)
+++ sql/jsonb/query-v2/value/bitmapscan.sql    2017-07-02 21:27:10 +0900 (d41fb0c)
@@ -18,12 +18,12 @@ SET enable_bitmapscan = on;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/query-v2/value/indexscan.sql (+2 -2)
===================================================================
--- sql/jsonb/query-v2/value/indexscan.sql    2017-07-01 16:43:19 +0900 (80e5123)
+++ sql/jsonb/query-v2/value/indexscan.sql    2017-07-02 21:27:10 +0900 (f8ad537)
@@ -18,12 +18,12 @@ SET enable_bitmapscan = off;
 EXPLAIN (COSTS OFF)
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: sql/jsonb/query-v2/value/seqscan.sql (+1 -1)
===================================================================
--- sql/jsonb/query-v2/value/seqscan.sql    2017-07-01 16:43:19 +0900 (4d277ab)
+++ sql/jsonb/query-v2/value/seqscan.sql    2017-07-02 21:27:10 +0900 (4cacf5e)
@@ -14,7 +14,7 @@ SET enable_bitmapscan = off;
 
 SELECT id, items
   FROM fruits
- WHERE items &? 'apple OR banana'
+ WHERE items &@~ 'apple OR banana'
  ORDER BY id;
 
 DROP TABLE fruits;

  Modified: src/pgrn-jsonb.c (+1 -0)
===================================================================
--- src/pgrn-jsonb.c    2017-07-01 16:43:19 +0900 (3869cc7)
+++ src/pgrn-jsonb.c    2017-07-02 21:27:10 +0900 (9dab85a)
@@ -1632,6 +1632,7 @@ PGrnJSONBBuildSearchCondition(PGrnSearchData *data,
 										  &(buffers->keyword));
 		break;
 	case PGrnQueryStrategyV2Number:
+	case PGrnQueryStrategyV2DeprecatedNumber:
 		grn_obj_reinit(ctx, &(buffers->keyword), GRN_DB_TEXT, 0);
 		PGrnConvertFromData(key->sk_argument, TEXTOID, &(buffers->keyword));
 		PGrnSearchBuildConditionJSONQuery(data,

  Modified: src/pgroonga.c (+23 -3)
===================================================================
--- src/pgroonga.c    2017-07-01 16:43:19 +0900 (bd83986)
+++ src/pgroonga.c    2017-07-02 21:27:10 +0900 (ec6bee9)
@@ -759,6 +759,13 @@ PGrnIsQueryStrategyIndex(Relation index, int nthAttribute)
 	if (OidIsValid(strategyOID))
 		return true;
 
+	strategyOID = get_opfamily_member(index->rd_opfamily[nthAttribute],
+									  leftType,
+									  rightType,
+									  PGrnQueryStrategyV2DeprecatedNumber);
+	if (OidIsValid(strategyOID))
+		return true;
+
 	return false;
 }
 
@@ -798,6 +805,13 @@ PGrnIsQueryInStrategyIndex(Relation index, int nthAttribute)
 	if (OidIsValid(strategyOID))
 		return true;
 
+	strategyOID = get_opfamily_member(index->rd_opfamily[nthAttribute],
+									  leftType,
+									  rightType,
+									  PGrnQueryInStrategyV2Deprecated2Number);
+	if (OidIsValid(strategyOID))
+		return true;
+
 	return false;
 }
 
@@ -1995,7 +2009,7 @@ pgroonga_similar_text(PG_FUNCTION_ARGS)
 
 	ereport(ERROR,
 			(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-			 errmsg("pgroonga: operator &~? is available only in index scan")));
+			 errmsg("pgroonga: similar search available only in index scan")));
 
 	PG_RETURN_BOOL(false);
 }
@@ -2008,7 +2022,7 @@ pgroonga_similar_text_array(PG_FUNCTION_ARGS)
 {
 	ereport(ERROR,
 			(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-			 errmsg("pgroonga: operator &~? is available only in index scan")));
+			 errmsg("pgroonga: similar search is available only in index scan")));
 
 	PG_RETURN_BOOL(false);
 }
@@ -2021,7 +2035,7 @@ pgroonga_similar_varchar(PG_FUNCTION_ARGS)
 {
 	ereport(ERROR,
 			(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-			 errmsg("pgroonga: operator &~? is available only in index scan")));
+			 errmsg("pgroonga: similar search is available only in index scan")));
 
 	PG_RETURN_BOOL(false);
 }
@@ -3366,6 +3380,7 @@ PGrnSearchBuildCondition(Relation index,
 	case PGrnPrefixRKInStrategyV2Number:
 	case PGrnQueryInStrategyV2Number:
 	case PGrnQueryInStrategyV2DeprecatedNumber:
+	case PGrnQueryInStrategyV2Deprecated2Number:
 	case PGrnMatchInStrategyV2Number:
 	case PGrnMatchInStrategyV2DeprecatedNumber:
 		switch (valueTypeID)
@@ -3419,8 +3434,10 @@ PGrnSearchBuildCondition(Relation index,
 		break;
 	case PGrnQueryStrategyNumber:
 	case PGrnQueryStrategyV2Number:
+	case PGrnQueryStrategyV2DeprecatedNumber:
 		break;
 	case PGrnSimilarStrategyV2Number:
+	case PGrnSimilarStrategyV2DeprecatedNumber:
 		operator = GRN_OP_SIMILAR;
 		break;
 	case PGrnScriptStrategyV2Number:
@@ -3440,6 +3457,7 @@ PGrnSearchBuildCondition(Relation index,
 		break;
 	case PGrnQueryInStrategyV2Number:
 	case PGrnQueryInStrategyV2DeprecatedNumber:
+	case PGrnQueryInStrategyV2Deprecated2Number:
 		break;
 	case PGrnMatchInStrategyV2Number:
 	case PGrnMatchInStrategyV2DeprecatedNumber:
@@ -3477,6 +3495,7 @@ PGrnSearchBuildCondition(Relation index,
 		break;
 	case PGrnQueryStrategyNumber:
 	case PGrnQueryStrategyV2Number:
+	case PGrnQueryStrategyV2DeprecatedNumber:
 		PGrnSearchBuildConditionQuery(data,
 									  targetColumn,
 									  GRN_TEXT_VALUE(&(buffers->general)),
@@ -3519,6 +3538,7 @@ PGrnSearchBuildCondition(Relation index,
 	}
 	case PGrnQueryInStrategyV2Number:
 	case PGrnQueryInStrategyV2DeprecatedNumber:
+	case PGrnQueryInStrategyV2Deprecated2Number:
 	{
 		grn_obj *queries = &(buffers->general);
 		unsigned int i, n;

  Modified: src/pgroonga.h (+10 -4)
===================================================================
--- src/pgroonga.h    2017-07-01 16:43:19 +0900 (f692f9d)
+++ src/pgroonga.h    2017-07-02 21:27:10 +0900 (e200137)
@@ -25,13 +25,16 @@
 #define PGrnJSONContainStrategyNumber	11	/* operator @> */
 
 #define PGrnMatchStrategyV2Number		12	/* operator &@	(@ in Groonga) */
-#define PGrnQueryStrategyV2Number		13	/* operator &?  (query in Groonga) */
-#define PGrnSimilarStrategyV2Number		14	/* operator &~? (similar search) */
+/* operator &? (query in Groonga). Deprecated since 1.2.2. */
+#define PGrnQueryStrategyV2DeprecatedNumber	13
+/* operator &~? (similar search). Deprecated since 1.2.2. */
+#define PGrnSimilarStrategyV2DeprecatedNumber	14
 #define PGrnScriptStrategyV2Number		15	/* operator &`  (script in Groonga) */
 #define PGrnPrefixStrategyV2Number		16	/* operator &^  (prefix search) */
 #define PGrnPrefixRKStrategyV2Number	17	/* operator &^~ (prefix RK search) */
 #define PGrnMatchInStrategyV2Number		18	/* operator &@| (multiple conditions of @ in Groonga) */
-#define PGrnQueryInStrategyV2Number		19	/* operator &?| (multiple conditions of query in Groonga) */
+/* operator &?| (multiple conditions of query in Groonga). Deprecated since 1.2.2. */
+#define PGrnQueryInStrategyV2Deprecated2Number	19
 #define PGrnPrefixInStrategyV2Number	20	/* operator &^| (multiple conditions of prefix search) */
 #define PGrnPrefixRKInStrategyV2Number	21	/* operator &^~| (multiple conditions of prefix RK search) */
 #define PGrnRegexpStrategyV2Number		22	/* operator &~ (@~ in Groonga) */
@@ -44,8 +47,11 @@
 #define PGrnMatchInStrategyV2DeprecatedNumber	26
 /* operator &?> (multiple conditions of query in Groonga). Deprecated since 1.2.1. */
 #define PGrnQueryInStrategyV2DeprecatedNumber	27
+#define PGrnQueryStrategyV2Number	28	/* operator &?  (query in Groonga) */
+#define PGrnSimilarStrategyV2Number	29	/* operator &~? (similar search) */
+#define PGrnQueryInStrategyV2Number	30	/* operator &?| (multiple conditions of query in Groonga) */
 
-#define PGRN_N_STRATEGIES PGrnQueryInStrategyV2DeprecatedNumber
+#define PGRN_N_STRATEGIES PGrnQueryInStrategyV2Number
 
 /* file and table names */
 #define PGrnLogPathDefault				"pgroonga.log"




More information about the Groonga-commit mailing list
Back to archive index