On 16 Aug 2007, at 17:20, Alf Eaton wrote:

When searching a multiValued field, is it possible to know which of the multiple fields the match was in?

For example if I have an index of documents, each of which has multiple image captions stored in separate fields, I'd like to be able to link from the search results to the caption in the original document.

One possibility could be attaching metadata to a field, similar to payloads for terms. At the moment all I can think of is adding metadata inside the stored field and stripping that out when it's indexed and displayed, but that's not ideal.

Actually on reflection all this would need would be for the Highlighter to add a field to the response, saying which item of the multiValued field the match was in. Is that possible?

alf.


Reply via email to