lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SOME ONE <>
Subject Custom Sorting
Date Fri, 17 Feb 2006 18:27:52 GMT

I am using MultiFieldQueryParser (Lucene 1.9) to
search title and body fields in the documents. The
requirement is that documents with title match should
be returned before the documents with body match.
Using the default scoring, title matches do come
before the body matches. But, I also need the
documents with title matches sorted by date, and
documents with body matches sorted by date. i.e there
will be two groups of docs in the results, one with
title match and the other with just body match, the
first group of docs should come before the second
group, and each group should be sorted by date.

I am not concerned with the Lucene scoring as the
documents are very short. So, I think, just two scores
as described above for the two groups of docs are
sufficient. I am new to Lucene and have been looking
into its code trying to figure out how to achieve the
desired behaviour but can't seem to.

Any help in this regard will be greatly appreciated.

Thanks and Regards

Send instant messages to your online friends 

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message