对多值字段计数进行操作的 Solr 函数查询 [英] Solr function query that operates on count of multivalued field

查看:20
本文介绍了对多值字段计数进行操作的 Solr 函数查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在 Solr 函数查询中计算多值字段中值的数量吗?我将如何编写函数查询来返回具有特定字段的 3 个或更多值的文档?

Can I, within a Solr function query, count the number of values in a multivalued field? How would I write a function query that returns documents with, say, 3 or more values for a particular field?

推荐答案

这里是函数查询参考,而且它没有列出类似的东西,所以我认为可以安全地假设没有这样的东西.

Here's the function query reference, and it doesn't list anything like that, so I think it's safe to assume that there's no such thing.

如果值计数与您的情况有某种关系,请将其添加为单独的 int 字段,然后对该字段进行操作.

If the value count is somehow relevant in your case, add it as a separate int field, then operate on that field.

这篇关于对多值字段计数进行操作的 Solr 函数查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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