let say I have got a multivalued field named myfield
and some documents containing some values in myfield
.
Now I start a query like this:
myfield:foobar
The result will be something like this:
<doc>
<arr name="myfield">
<str>foobar_1</str>
<str>foobar_2</str>
</arr>
</doc>
<doc>
<arr name="myfield">
<str>foobar_3</str>
<str>foobar_4</str>
</arr>
</doc>
But I don't want the result to be separated by documents. I want it flat, something like this:
<arr name="myfield">
<str>foobar_1</str>
<str>foobar_2</str>
<str>foobar_3</str>
<str>foobar_4</str>
</arr>
Is this possible in some way? Any good hint for me?
Let's try to explain want I want to do:
Every document of my solr index has a list of notations (stored in multivalued field). Now I want to search and browse those notations.
I'm going to need a special scoring for the result, so I'm going to write my own QParserPlugin
.