lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From SOME ONE <sum...@yahoo.com>
Subject Re: Custom Sorting
Date Sat, 18 Feb 2006 08:39:07 GMT
Hi,

Yes, I could run two searches, but that means running
two searches for each request from user and that I
think doubles the job taking double time. Any
suggestions to do it more efficiently please ?

Thanks and Regards
Wiseman


--- "Michael D. Curtin" <mike@curtin.com> wrote:

> SOME ONE wrote:
> 
> > Hi,
> > 
> > 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.


>
> Would it work to run 2 searches, one with only the
> title criteria and then 
> another with only the body criteria?
> 
> --MDC
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail:
> java-user-help@lucene.apache.org
> 
> 


Send instant messages to your online friends http://uk.messenger.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message