Mailing List Archive

Fwd: Finding out which fields matched the query
---------- ????? ---------
???? Yichen Sun <yichen98@bu.edu>
???2022?6?25? ??11:14
???Finding out which fields matched the query
???? <dev@lucene.apache.org>, <issues-subscribe@lucene.apache.org>, <
java-user@lucene.apache.org>


Hello!

I’m a MSCS student from BU and learning to use Lucene. Recently I try to
output matched fields by one query. For example, for one document, there
are 10 fields and 2 of them match the query. I want to get the name of
these fields.

I have tried using explain() method and getting description then regex.
However it cost so much time.

I wonder what is the efficient way to get the matched fields. Would you
please offer some help? Thank you so much!

Best regards,
Yichen Sun
Re: Fwd: Finding out which fields matched the query [ In reply to ]
Many of us already answered in the dev mailing list.

Uwe

Am 25.06.2022 um 05:19 schrieb Yichen Sun:
> ---------- ????? ---------
> ???? Yichen Sun <yichen98@bu.edu>
> ???2022?6?25? ??11:14
> ???Finding out which fields matched the query
> ???? <dev@lucene.apache.org>, <issues-subscribe@lucene.apache.org>, <
> java-user@lucene.apache.org>
>
>
> Hello!
>
> I’m a MSCS student from BU and learning to use Lucene. Recently I try to
> output matched fields by one query. For example, for one document, there
> are 10 fields and 2 of them match the query. I want to get the name of
> these fields.
>
> I have tried using explain() method and getting description then regex.
> However it cost so much time.
>
> I wonder what is the efficient way to get the matched fields. Would you
> please offer some help? Thank you so much!
>
> Best regards,
> Yichen Sun
>
--
Uwe Schindler
Achterdiek 19, D-28357 Bremen
https://www.thetaphi.de
eMail: uwe@thetaphi.de


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org