Thank you for your response. Unfortunately, I do need the frequency for all the hits. I downloaded your patch, and ofter applying it, It works! Thank you very much.
How ever, I could not apply the patch using the patch command (I am on windows and using UnxUtils, could this be the problem). I had to go through and manually apply the patch. This is the error I got while attempting to apply it(using the --verbose option, and there was a lot of stuff in front of it): patch: **** malformed patch at line 207: rs) { I am using the source downlaod of 3.0.2, although I could not get the patch to work on the latest svn either. Thank you again, Ryan On Sun, Aug 8, 2010 at 10:17 AM, Michael McCandless < luc...@mikemccandless.com> wrote: > Do you need this for a single document, eg for debugging? If so, > IndexSearcher.explain can give you these details. > > If you need it for all hits, then Lucene does not make that easy > today, which is somewhat frustrating because this information (freq of > occurrence of each clause matching the current hit) is being computed, > to compute the net score; it's just not accessible. > > But this is requested fairly often, so... I just opened an issue to > make this possible: > > https://issues.apache.org/jira/browse/LUCENE-2590 > > Mike > > On Sun, Aug 8, 2010 at 12:44 AM, Ryan McV <rpm0...@gmail.com> wrote: > > Hello All, > > > > Is there a way to count the number of times a query matched in a > particular > > document? > > > > For example, say we created a document that had the string "cheese cheese > > cheese cheese" in the field that is being searched. > > I would like to know that the query "cheese" matched four times in that > > particular document. Is there a way to do this? > > > > BTW, I am new to Lucene, so if I have any misconceptions that are > apparent > > please feel free to correct me. > > > > Thanks, > > Ryan > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >