Solr return whether member is in multivalued field
Posted
by ??iu
on Stack Overflow
See other posts from Stack Overflow
or by ??iu
Published on 2010-05-25T14:05:52Z
Indexed on
2010/05/25
14:31 UTC
Read the original article
Hit count: 193
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.
© Stack Overflow or respective owner