Yes, I found what I need is the term vector which is stored in the indexing
time.
I am appreciate you guide me to "Lucene in action", but I think the
interface it offered is version 1.4.
So I need to get the syntax for lucene2.0 for making the term vector add to
the document when the indexing time.
By the way, the sort function is lower-level and faster than i thought, it
is nick work now(I've implemented ScoreDocComparator and comparator for my
own!).
Thanks a lot!
And Best regards!
:)




Mathieu Lecarme wrote:
> 
> If I understand well your needs:
> You ask lucene for a set of words
> You wont to sort result by number of different words wich match?
> The query is not good, it would be
> 
> +content:(aleden bob carray)
> 
> I don't understand how can you sort at indexing time with informations
> known at querying time.
> 
> M.
> savageboy a écrit :
>> Yes, Mathieu.
>> I just have the book "Lucene in action" by my hand, it is chinese
>> language
>> version, it is about lucene1.4, hope it is not too old.
>> If I use SortComparatorSource, does it means it will be do the sort work
>> at
>> the user query time?
>> Can I sort (maybe score it atindexing time)?
>>
>>
>>
>> Mathieu Lecarme wrote:
>>   
>>> 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]
>>>
>>>
>>>
>>>     
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Need-help-for-ordering-results-by-specific-order-tf4101844.html#a11700924
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]

Reply via email to