如何在lucern solr中搜索所有/通配符 [英] how to search all / wildcard in lucern solr

查看:32
本文介绍了如何在lucern solr中搜索所有/通配符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 RoR + act_as_solr 来查询 Solr 数据库.

I'm using RoR + acts_as_solr to query a Solr database.

我习惯于使用*"来全选,感谢 MySQL,但该命令在 Solr 中引发异常.它们是我可以使用的其他通配符吗?建议?谢谢!

I'm used to using "*" to select all, thanks to MySQL, but that command fires an exception in Solr. Are they other wildcards I can use? Suggestions? Thanks!

推荐答案

你不能在 lucene 中查询all".执行此操作的典型方法是为所有文档添加具有相同值的字段并查询该值.

You can't query for "all" in lucene. The typical way to do it is to add a field with the same value for all documents and query for that value.

这篇关于如何在lucern solr中搜索所有/通配符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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