Typo... try explain(query,doc) instead of (query,i) :-)
-Yonik Now hiring -- http://forms.cnet.com/slink?231706 On 10/26/05, Olivier Jaquemet <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I am encoutering a really weird problem, I'm doing a query which gives > me perfectly good results, with scores which are looking pretty right > too. I wanted to display an explanation of some of my results just to > check for something, and ALL hits output this explanation > 0.0 = product of: > 0.0 = sum of: > 0.0 = coord(0/3) > > It's been two hours I have been digging through my code for a possible > reason to this. > I even tried to simplify my code: > - I was using a MultiFieldQueryParser, I removed it in favor a simpler > QueryParser, no change. still good results but same bad explanation > - I was using a MultiIndexSearcher wrapper to reuse the searcher as long > as no indexing occured, I remove it and created a new one which only > search one index, no change. still good results but same bad explanation > I tried the same query a MultiFieldQueryParser creates, with luke and > explanation (of simple query) are good! > > > Here is how i call the explain method: > for (int i = 0; i < hits.length(); i++) { > Document doc = hits.doc(i); > [...] > logger.debug(searcher.explain(query, i)); > } > > I could not find anything and I have no idea where to look. > So if you can see my mistake or know how this problem can occurs please > help ! > > Olivier > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >