Is it possible to add multiple locations for a single node, and solr can display the entire location for a search?

Scenario: Suppose you have a product in several places, and when you are looking for a product (not for a location), you should see all the locations. In Drupal, you can use multi-valued fields for locations (but in solr I don't know). When indexing a whit solr product, you should not send it, say, 3 times (and hold it in your DB 3 times) only once.

+4
source share
1 answer

In addition, you can have multi-valued fields.

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

Thus, the layout will be a multi-valued item with a Single Product entry in Solr. These locations will be returned with the product document, and you can filter the facet according to location information as needed.

+4
source

Source: https://habr.com/ru/post/1381724/


All Articles