0
votes

I got a field in my solr index which holds comma separated values like "area1,area2,area3,area4". There are documents in it where the value is just one value like "area6".

Now i want to make a facet search over all this values.

Example (This is what i want):

area1:10

area2:4297

area3:54

area4:65

area6:87

This is what i get

area1,area2,area3,area4: 7462

area6: 87

Does solr delivers any solutions for this problem or must i seperate the different values on my own.

1

1 Answers

2
votes

While indexing you need to get tokens out of the data using ,. You can use the PatternTokenizerFactory tokenizer with , as the pattern. This would split your text whenever it finds a ,.

The field in your schema.xml should be multivalued.