On 8/16/07, Alf Eaton <[EMAIL PROTECTED]> wrote:
>
> 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?

Could you perhaps index the captions as
#1 this is the first caption
#2 this is the second caption

And then when just look for #n in the highlighted results?
For display, you could also strip out the #n in the captions.

-Yonik

Reply via email to