java-user@lucene.apache.org
[Top] [All Lists]

How to know the matched field?

Subject: How to know the matched field?
From: Paul Libbrecht
Date: Sun, 22 Mar 2009 21:30:18 +0100

Hello list,

in an auto-completion task, I would like to show to the user the field that's been matched against the query in the found document.

Typically, my documents have multiple fields for each field-name and I would like the index's findings to give me the field used. How can I do that?

It seems to me a task of the highlighter (or of the QueryScorer?) but I am actually not interested into extracting the fragment found just to know the exact field found.

thanks in advance

paul
<Prev in Thread] Current Thread [Next in Thread>