Re: Get matching fields from a BooleanQuery

2017-06-22 Thread Frederik Van Hoyweghen
t; 0.75 = parameter b > 28.2 = avgFieldLength > 28.45 = fieldLength" > > > > > > How to know the matching fields from an Explanation Object? > > > Regards, > Ranganath B. N. > > > -----Original Message- > From: Adri

RE: Get matching fields from a BooleanQuery

2017-06-22 Thread Ranganath B N
ds from an Explanation Object? Regards, Ranganath B. N. -Original Message- From: Adrien Grand [mailto:jpou...@gmail.com] Sent: Thursday, June 22, 2017 12:55 PM To: java-user@lucene.apache.org Subject: Re: Get matching fields from a BooleanQuery Hi Frederik, Using explain should be fine fo

Re: Get matching fields from a BooleanQuery

2017-06-22 Thread Adrien Grand
Hi Frederik, Using explain should be fine for that use-case since you will only apply it to the top hits. Otherwise you could use the low-level search APIs in order to do this. It would look something like that if you want to find which query among `queries` matches document `docID` (I did not che

Get matching fields from a BooleanQuery

2017-06-19 Thread Frederik Van Hoyweghen
Hey everyone, To start, we are using Lucene 4.3. To search, we prepare several queries and combine these into a BooleanQuery. What we are looking for is a way to determine on which specific fields a certain document matched. For example, I create 2 queries: one to search in the "Name" field, and