Assuming a multivalued, stored and indexed field with name "comment".
When performing a search, I would like to return only the values of
"comment" which contain the match. For example:

When searching for "gold" instead of getting this result:

<doc>
    <arr name="comment">
        <str>Theres a lady whos sure</str>
        <str>all that glitters is gold</str>
        <str>and shes buying a stairway to heaven</str>
    </arr>
</doc>

I would prefer to get this result:

<doc>
    <arr name="comment">
        <str>all that glitters is gold</str>
    </arr>
</doc>

(psuedo-XML from memory, may not be accurate but illustrates the point)

Is there any way to do this with a Solr 4 index? The client accessing
Solr is on a dial-up connection (no provision for DSL or other high
speed internet) so I'd like to move as little data over the wire as
possible. In reality, the array will have tens of fields so returning
only the relevant fields may reduce the data transferred by an order
of magnitude.

Thanks.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

Reply via email to