初めまして、最近Mroongaを使い始めた者です 初歩的な質問で申し訳ないのですが、どこで質問したら良いかわからずこちらに失礼させていただきます
https://groonga.org/docs/spec/search.html こちらのドキュメントを読んでおりまして、selectのqueryパラメータの仕様に関して質問させてください
CREATE TABLE `test` (
`content` text NOT NULL
) ENGINE=Mroonga DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `test` ADD FULLTEXT KEY `content` (`content`) COMMENT='tokenizer "TokenMecab"';
というテーブルを作りまして、東京都民に深刻なダメージを与えました。 というレコードを追加しました
SELECT mroonga_command('select test --match_columns content --query "東京に深刻"')
その後上記のようなクエリを実行すればqueryのキーワードが 東京/に/深刻 のように分割されて東京都民に深刻なダメージを与えました。 がヒットするかと考えていたのですがヒットしませんでした
SELECT mroonga_command('select test --match_columns content --query "東京 に 深刻"')
と間にスペースを入れるとヒットするので、トークナイズの場合はただ分割しているだけではなく何かしら他の条件があるのではないかと思ったのですが、自分の理解が誤っているのかなどご教授いただけますと幸いです 念の為
SELECT mroonga_command('tokenize "TokenMecab" \'彼の名前は山田さんのはずです。\'')
ではトークナイズされた結果は返ってきます
もし質問する場所が間違っていましたら申し訳ございません よろしくお願いいたします
|