You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Olivier Jaquemet <ol...@jalios.com> on 2005/10/26 18:25:37 UTC
Bad explanations
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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Bad explanations
Posted by Olivier Jaquemet <ol...@jalios.com>.
LOL, have you ever seen a man humiliating himself in public in a mailing
list? cause I just did ;)
thank you yonik ... :)
Yonik Seeley wrote:
>To be more literal, I actually meant "explain(query,hits.id(i))"
>
>On 10/26/05, Yonik Seeley <ys...@gmail.com> wrote:
>
>
>>Typo... try explain(query,doc) instead of (query,i)
>>:-)
>>
>>
>>
>
>
>
--
Olivier Jaquemet <ol...@jalios.com>
Ingénieur R&D Jalios S.A.
Tel: 01.39.23.92.83
http://www.jalios.com/
http://support.jalios.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: Bad explanations
Posted by Yonik Seeley <ys...@gmail.com>.
To be more literal, I actually meant "explain(query,hits.id(i))"
On 10/26/05, Yonik Seeley <ys...@gmail.com> wrote:
>
> Typo... try explain(query,doc) instead of (query,i)
> :-)
>
Re: Bad explanations
Posted by Yonik Seeley <ys...@gmail.com>.
Typo... try explain(query,doc) instead of (query,i)
:-)
-Yonik
Now hiring -- http://forms.cnet.com/slink?231706
On 10/26/05, Olivier Jaquemet <ol...@jalios.com> 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: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>