# 障害票 2025 existence 関数追加
# 検索語の文書内有無が確認できる existence 関数

Begin;
Initialize;
InitializeSession "TEST";

Command "create database TEST";

Command "create table T (ID int, F nvarchar(256))";
Command "create fulltext index T_F on T(F)";
Command "insert into T values (1, 'リコーの環境への取り組み')";
Command "insert into T values (2, 'リコーのリコーたるゆえん')";

Command "select tf(F) from T where F contains wordlist('リコー', '環境')";
Command "select existence(F) from T where F contains wordlist('リコー', '環境')";
Command "drop table T";

Command "create table T (ID int, F nvarchar(256) array[no limit])";
Command "create fulltext index T_F on T(F)";
Command "insert into T values (1, array['リコーの環境への取り組み'])";
Command "insert into T values (2, array['リコーのリコーたるゆえん'])";

Command "select tf(F) from T where F contains wordlist('リコー', '環境')";
Command "select existence(F) from T where F contains wordlist('リコー', '環境')";
Command "drop database TEST";

TerminateSession;
Terminate;
End;

