lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From savageboy <>
Subject Need help for ordering results by specific order
Date Wed, 18 Jul 2007 08:29:41 GMT

I am newer for lucene.
I have a project for search engine by Lucene2.0. But near the project
finished, My boss want me to order the result by the sort blew:

the query likes '+content:"aleden bob carray" '

content                                                            date                  
"alden bob carray ... "                                        2005/12/23                
"alden... alden ... bob... bob... carray..."               2005/12/01                
"alden... alden ... bob... carray"                           2005/11/28                
"alden... carray"                                                2005/12/24              
"alden... bob"                                                    2005/12/24             

the meaning of the sort above is no matter how much the term match in the
field "content", there will be met four satuations :"3 matched","2
matched","1 matched","0 matched". In the "3 matched" group, I need sorting
the result by it's date desc, and in the "2 matched" group is same...

But I dont know HOW to get this results in Lucene...
Should I override the method of scoring? (tf(t in d) <term in field>,idf(t)
<inverse doc frequence>)
Could you give me some references about it?

I am really stucked, and Need You help!!

View this message in context:
Sent from the Lucene - Java Developer mailing list archive at

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

View raw message