Solr return whether member is in multivalued field
- by ??iu
Is there any way to return in the fields list whether a value exists as one of the values of a multivalued field?
E.g., if your schema is
<schema>
...
<field name="user_name" type="text" indexed="true" stored="true" required="true" />
<field name="follower" type="integer" indexed="true" stored="true" multiValued="true" />
...
</schema>
A sample document might look like:
<doc>
<field name="user_name">tester blah</field>
<field name="follower">1</field>
<field name="follower">62</field>
<field name="follower">63</field>
<field name="follower">64</field>
</doc>
I would like to be able to query for, say, "tester" and follower:62 and have it match "tester blah" and have some indication of whether 62 is a follower or not in the results.