创建表时指定索引:
INDEX idx_msg_text (msg_text
) USING INVERTED PROPERTIES("parser" = "chinese", "lower_case" = "true", "support_phrase" = "true", "ignore_above" = "10240", "parser_mode" = "fine_grained", "stopwords" = "none")
查询语句:
select * from ods_chat_msg where msg_text match_phrase '盐城 a'
结果中存在msg_text=”江苏盐城买断三包“的记录
我理解这会儿应该只返回 盐城和a都存在,且a在盐城后面 这种文本。
stopwords没效果?