Wow, I finally found out why I was getting results in the wrong order
- I got the results in the correct order from the Lucene index. I
got the explanation of each of the results along with their database
id and found the ordering mismatch.
The problem is in the database call. I am calling:
select * from product where id in (444, 333, 555, 888);
and the ordering that comes back is not preserved. So the results
are correct but the ordering and hence all of the relevancy is out
the window. So that at least leads me to the actual problem. Now I
have to figure out how I'll approach reordering the results because I
don't believe that there's any way to force the ordering of a list
and I don't want to call a separate database query for each id (lots
of database round-trips).
Thanks for the help Erik!
On Apr 13, 2006, at 7:13 PM, Erik Hatcher wrote:
On Apr 13, 2006, at 8:55 PM, Jeremy Hanna wrote:
Looking at the results, the first document in the results should
hopefully be near the bottom and the Explanation for this document
has a Description/Details (using the toString() on the
Explanation) of:
product of:
0.0 = sum of:
0.0 = coord(0/7)
So I'm kind of at a loss as to what's going on. Am I just doing
something crazy weird in my code? I didn't find that many
examples out there, so I'm kind of winging it according to what
I've read in the javadocs and what examples I could find.
Be sure to pass the document id, not the hit number, to explain().
Looks like you passed an id of an unmatched document.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]