Is it possible to add multiple location for a single node and solr can show all location for a search?

雨燕双飞 提交于 2019-12-10 18:08:47

问题


The scenario: let's say you have a product in multiple location and when you search for the product (not for location) you should see all locations. In Drupal you can use multivalue fields for locations (but in solr I don't know). When index the product whit solr you should not send it, let's say, 3 time (and hold it in your DB 3 times) just once.


回答1:


In sor also, you can have multivalued fields.

<field name="location" type="text" indexed="true" stored="true" multiValued="true"/>

So the location would be multivalued entries with a Single Product entry in Solr. The locations would be returned with the product document, and you can filter, facet on the location information as required.



来源:https://stackoverflow.com/questions/8169324/is-it-possible-to-add-multiple-location-for-a-single-node-and-solr-can-show-all

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!