在搜索定义中,struct中的字段不能具有“属性”索引.
http://docs.vespa.ai/documentation/reference/search-definitions-reference.html#field_types
此外,默认情况下,struct和maps不是属性.
结果搜索定义如下所示:
struct nlp { field token type string { match: text //can't add indexing here } } field n type nlp { indexing: summary //can't add attribute here }
如何添加搜索定义,以便我们可以按“n.token”进行分组?是否可以为struct字段添加属性或索引?或者按非属性字段分组?
解决方法
如果要使用索引搜索运行分组,则struct字段类型不能具有必要先决条件的属性,请参阅
http://docs.vespa.ai/documentation/reference/search-definitions-reference.html#struct
使用mode = index的struct字段唯一可以做的就是将它们作为摘要(响应)的一部分.您可以添加一个自定义搜索器,该搜索器在struct字段上进行聚合,分析前K个检索到的命中.见http://docs.vespa.ai/documentation/searcher-development.html
使用mode = streaming,您可以在struct字段上运行分组,更多关于流媒体http://docs.vespa.ai/documentation/streaming-search.html
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。