faceting on correlated multi-valued fields?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

faceting on correlated multi-valued fields?


I'm thinking about indexing articles with tags in a denormalized way as

<field name="id" type="string" .../>
<field name="text" type="text_general" .../>

<field name="tagIds" type="string" indexed="true" stored="true"
<field name="tagDescriptions" type="text_general" indexed="true"
stored="false" multiValued="true"/>

An article can have multiple tags. Each tag has a description and an ID.
The multi-valued fields tagIds and tagDescriptions have the same length
and order (tagDescriptions[5] is the description of the tag with ID

Is there a good way to get the IDs of tags with some description (query
on tagDescriptions) that are used for articles matching some query on
field text?
I thought about faceting on tagIds but I don't know how to restrict the
result to the ids with a given description.

Or would you use a different index schema for this use-case?

I'm still using Solr 4.10.4. Is this something that can be done more
easily with newer versions?

Thanks for any hints!