sunspot /solr 中每条记录的每个动态字段的多个值
我在产品模型中使用dynamic_string来索引负载 用户创建的动态字段。这很好用,给了我 我认为能够显示以下内容以允许用户缩小范围 结果:
Color ---------- red green blue etc...
问题是,其中一些有 2 个或更多选项 产品即颜色=>蓝色,红色
当我尝试将其添加到颜色散列中时,它恰好覆盖了 第一个,只让我为每个字段分配一个值。
有没有办法让每个动态字段有多个值 产品 ?如果是这样,您能告诉我如何实现这一目标吗?
希望这是有道理的。
I am using the dynamic_string in my product model to index a load of
user created dynamic fields. This works great and gives me the
ablitiy in my view to show the following to allow the user to narrow
the results :
Color ---------- red green blue etc...
The problem is that in some of these there are 2 or more options for a
product ie color => blue, red
When i try to add this into the color hash it just over rides the
first one, only letting me have one value for each field.
Is there a way to have multiple values per dynamic field per
product ? If so please can you tell me how this can be achieved ?
Hope this makes sense.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
查看 Solr
schema.xml 时Sunspot 自带的
中,我看到以下声明:动态字符串字段(
_ds
)不支持多个值,但似乎有一个动态多字符串(<代码>_dms)。我不太了解太阳黑子,无法告诉您该字段的实际名称,但应该很容易找到。When looking at the Solr
schema.xml
that comes with Sunspot, I see the following declarations:The dynamic string field (
_ds
) does not support multiple values, but there seems to be a dynamic multi string (_dms
). I don't know Sunspot well enough to tell you how this fiels is actually called but it should be easy to find out.