Solr 范围存储桶和长 URL
我想看看在 Solr 3.4 中是否可以将字段范围定义为字段本身,这样说:
Price : [0-1000]
Price : [1001-*]
我可以简单地为每个字段传递一个字段名称,例如 PriceLow 和 PriceHigh 。我需要返回最多 50 个范围的构面计数,我担心我会受到通过 HTTP Get 传递它们的长度的限制。由于我传递的查询也很长。
谢谢 本
I am looking to see if in Solr 3.4 it is possible to define a range of a field as a field itself so say:
Price : [0-1000]
Price : [1001-*]
That i could simply pass a field name in say PriceLow and PriceHigh for each of these. I need to return facet count for upto 50 ranges and im concerned i will be limited by length passing them in via HTTP Get. As the queries i am passing are very long as well.
Thanks
Ben
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您正在寻找类似解释的内容 这里。
如果您有许多方面范围,则可以在使用正则表达式建立索引期间将范围预先计算为另一个字段中的纯字符串。您基本上可以创建以下 fieldType 的 copyField,其中每个模式都是不同的范围:
然后您可以直接在新的复制字段上进行分面,制作一个简单的字段分面。
这样您就可以避免使用具有多个范围的长网址,但如果您需要更改范围,则需要重新索引所有内容。
I think you're looking for something like explained here.
If you have many facet ranges, you can pre-compute the ranges as plain strings in another field during indexing playing around with regex. You can basically create a copyField of the following fieldType, on which every pattern is a different range:
Then you can directly facet on the new copy field making a simple field facet.
This way you can avoid using long urls with many ranges, but if you need to change your ranges you'll need to reindex everything.