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

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

问题描述

如果我有文本的multiValued字段类型,并且在其中输入了[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天全站免登陆