RediSearch FT.SEARCH命令中有什么FRAGS参数?

时间:2019-01-02 16:07:31

标签: redisearch

我在下面浏览了RediSearch documentationFT.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}参数有限制吗?

1 个答案:

答案 0 :(得分:1)

片段是搜索结果的子字符串,其中包含与搜索词有关的上下文信息;例如,当搜索“ Redis”时,文档中的一个片段可能是

“找到了。用户更喜欢 Redis ...”

这是summarization功能的一部分