Have a look of the book "Lucene in action", ch 6.1 : "using custom
sort method"
SortComparatorSource might be your friend. Lucene selecting stuff,
and you sort, just like you wont.
M.
Le 18 juil. 07 à 10:29, savageboy a écrit :
Hi,
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
order
"alden bob carray ... "
2005/12/23
1
"alden... alden ... bob... bob... carray..." 2005/12/01
2
"alden... alden ... bob... carray"
2005/11/28
3
"alden... carray"
2005/12/24
4
"alden... bob"
2005/12/24
5
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: http://www.nabble.com/Need-help-for-
ordering-results-by-specific-order-tf4101844.html#a11664583
Sent from the Lucene - Java Developer mailing list archive at
Nabble.com.
---------------------------------------------------------------------
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]