`highlight_query.query_string` 仍然会丢弃引号包围的表达式 - #4115 的修复并未覆盖 JSON 路径
作者: Arturus创建于 2026年9月16日更新于 2026年9月16日
ZZTERM4ZZ run --rm -d --name mant -p 19308:9308 manticoresearch/manticore:latestcurl -s 'http://127.0.0.1:19308/sql?mode=raw' --data-urlencode "query=CREATE TABLE t (content text)"
curl -s 'http://127.0.0.1:19308/sql?mode=raw' --data-urlencode "query=INSERT INTO t (id, content) VALUES (1, 'a hello world example')"1. The phrase as the main query — matches
curl -s http://127.0.0.1:19308/search -H 'Content-Type: application/json' -d '
{"table":"t","query":{"query_string":"\"hello world\""},"limit":1,"_source":[""]}'{"hits":{"total":1,"hits":[{"_id":1,"_score":2500,"_source":{}}]}}2. The same phrase as highlight_query.query_string — empty block
curl -s http://127.0.0.1:19308/search -H 'Content-Type: application/json' -d '
{"table":"t","query":{"query_string":"hello"},"limit":1,"_source":[""],
"highlight":{"fields":["content"],"highlight_query":{"query_string":"\"hello world\""},"allow_empty":true}}'{"hits":{"hits":[{"_id":1,"_source":{},"highlight":{}}]}}3. The same words unquoted — highlighted
... "highlight_query":{"query_string":"hello world"} ...…内容来源: manticoresoftware/manticoresearch