lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew Hall <mh...@informatics.jax.org>
Subject Question About Hits
Date Fri, 04 Apr 2008 20:06:10 GMT
This is more of a trying to understand the design sort of question, but 
its still something I need to able to succinctly express to my project 
manager.

I know that lucene is by design not allowing us to see which fields were 
hit for a given document in an easy manner.  Instead it presents us with 
a collection of hits, with each hit having the total score for the 
document, given all of the fields that you have searched on, with that 
total score being the score for the matches for each field combined via 
the scoring algorithm.

The question I'm being asked is why is the information about how each 
field matched not easily accessable in lucene?

I know I can go ahead and do a searcher.explain on my hit object, and 
then ... parse out the individual fields with their scores, but couldn't 
this be much more easily accessable from the hits object itself?

The hits object already has a get method that allows you to pass a 
String value for a string name to the object, couldn't another method be 
added such as getScoreByField(String s) that had access to the 
information that was used to build the total score of the document?

I'm sure part of the reason that this wasn't included were performance 
based, I mean it would be a fair amount of extra information for the 
average search to have to carry around, but for my application, and many 
others I'm sure, its a very important thing to be able to find out WHY a 
document was returned.  If for nothing less than for display purposes.

Anyhow, any insight as to why things are the way they are would be most 
appreciated, or if someone else has faced the same problems as I, and 
have went ahead and modified the hits object to include such things (and 
this is no small task) I'd love to hear about it.

-Matt


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


Mime
View raw message