How to perform a search in a Multivalued Field in Solr?

Thiago picture Thiago · Jul 9, 2012 · Viewed 26.4k times · Source

I'm having dificulties to execute a search in Solr. My Solr has a Multivalued field like this document below:

<int name="id">2166324592435</int>
...others fields
<arr name="Series">
   <str>The Walking Dead<\str>
   <str>Game of Thrones<\str>
<\arr>

The Multivalued field Series has the Tv serie which the document references. In the example above, my document says about The Walking Dead and Game of Thrones. I can have documents with one, two or more series or even no series.

What I want to do is search in Solr. I want to give the series that I want and Solr should returns the documents that says about my query. I tryed but I couldn't do it. I tryed the following:

q=series:The Walking Dead or series:Game of Thrones or ...&wt=json

I think I'm doing wrong. What's the correctly way to do it?

Thanks in advance

Thiago

Answer

silviu.ct picture silviu.ct · Jan 27, 2015

Try something like this:
series:("The Walking Dead" OR "Game of Thrones")