我在下面浏览了RediSearch documentation和FT.SEARCH
的语法:
FT.SEARCH {index} {query} [NOCONTENT] [VERBATIM] [NOSTOPWORDS] [WITHSCORES] [WITHPAYLOADS] [WITHSORTKEYS]
[FILTER {numeric_field} {min} {max}] ...
[GEOFILTER {geo_field} {lon} {lat} {raius} m|km|mi|ft]
[INKEYS {num} {key} ... ]
[INFIELDS {num} {field} ... ]
[RETURN {num} {field} ... ]
[SUMMARIZE [FIELDS {num} {field} ... ] [FRAGS {num}] [LEN {fragsize}] [SEPARATOR {separator}]]
[HIGHLIGHT [FIELDS {num} {field} ... ] [TAGS {open} {close}]]
[SLOP {slop}] [INORDER]
[LANGUAGE {language}]
[EXPANDER {expander}]
[SCORER {scorer}]
[PAYLOAD {payload}]
[SORTBY {field} [ASC|DESC]]
[LIMIT offset num]
我在任何地方都找不到FRAGS
的描述。 RediSearch FRAGS
命令中的FT.SEARCH
自变量是什么? {num}
参数有限制吗?
答案 0 :(得分:1)
片段是搜索结果的子字符串,其中包含与搜索词有关的上下文信息;例如,当搜索“ Redis”时,文档中的一个片段可能是
“找到了。用户更喜欢 Redis ...”
这是summarization功能的一部分