确定哪个值在 SOLR 多值字段类型中产生了命中 [英] determine which value produced a hit in SOLR multivalued field type

查看:16
本文介绍了确定哪个值在 SOLR 多值字段类型中产生了命中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有一个多值字段类型的文本,我将值 [cat,dog,green,blue] 放入其中.有没有办法告诉我什么时候针对 dog 的该字段执行查询,它位于那个 multiValued 字段的第一个元素位置?

If I have a multiValued field type of text, and I put values [cat,dog,green,blue] in it. Is there a way to tell when I execute a query against that field for dog, that it was in the 1st element position for that multiValued field?

假设:客户端不知道被查询的字段的字段类型是什么.(即 Solr 必须提供答案,并且客户端无法对返回文档进行后处理以找出答案,因为它不知道 SOLR 如何将查询与结果匹配).

Assumption: client does not have any pre-knowledge of what the field type of the field being queried is. (i.e. Solr must provide the answer and the client can't post process the return doc to figure it out because it would not know how SOLR matched the query to the result).

披露:我发布到 solr-user 列表并没有得到任何关注,所以我现在在这里发布.

Disclosure: I posted to solr-user list and am getting no traction so I post here now.

推荐答案

目前,Solr 中没有提供开箱即用的功能来告诉您值在 multiValue 字段中的位置.

Currently, there's no out-of-the-box functionality provided in Solr which tells you the position of a value in a multiValue field.

这篇关于确定哪个值在 SOLR 多值字段类型中产生了命中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆