We came across this problem, unfortunately we gave up and did our hit- highlighting for multi-valued fields on the frontend. :-/ One approach would be to extend solr to return every value of a multi- valued field in the highlighting, regardless of whether that particular value matched. Just an idea, don't know if it's feasible or not. if anyone can point me in the right direction I could probably bash together a plugin and some tests.
Toby.

On 20 Jan 2009, at 16:31, Feak, Todd wrote:

Anyone that can shed some insight?

-Todd

-----Original Message-----
From: Feak, Todd [mailto:todd.f...@smss.sony.com]
Sent: Friday, January 16, 2009 9:55 AM
To: solr-user@lucene.apache.org
Subject: How to select *actual* match from a multi-valued field

At a high level, I'm trying to do some more intelligent searching using
an app that will send multiple queries to Solr. My current issue is
around multi-valued fields and determining which entry actually
generated the "hit" for a particular query.



For example, let's say that I have a multi-valued field containing
people's names, associated with the document (trying to be non- specific
on purpose). In one document, I have the following names:

Jane Smith, Bob Smith, Roger Smith, Jane Doe. If the user performs a
search for Bob Smith, this document is returned. What I want to know is
that this document was returned because of "Bob Smith", not because of
Jane or Roger. I've tried using the highlighting settings. They do
provide some help, as the Jane Doe entry doesn't come back highlighted,
but both Jane and Roger do. I've tried using hl.requireFieldMatch, but
that seems to pertain only to fields, not entries within a multi- valued
field.



Using Solr, is there a way to get the information I am looking for?
Specifically, that "Bob Smith" is the value in the multi-valued field
that triggered the hit?



-Todd Feak


Toby Cole
Software Engineer

Semantico
Lees House, Floor 1, 21-23 Dyke Road, Brighton BN1 3FE
T: +44 (0)1273 358 238
F: +44 (0)1273 723 232
E: toby.c...@semantico.com
W: www.semantico.com

Reply via email to