2010/1/12 Wangsheng Mei <hairr...@gmail.com>

> I have considered building lucene index like:
> Document:  { title, content, author, friends }
> Thus, author and friends are two seperate fields. so I can boost them
> seperately.
> The problem is, if a document's author is the logged-in user, it's
> uncessary to search the friends field, because it would not appear in that
> field(someone would be the friend of himself)
>
 Sorry, someone would not be the friend of himself

>
> Then I consider merging author and friends field, like:
> Document : { title, content, authors }
> the authors field contains author and it's friends with whitespace
> seperating them.
> but how can I give author himself's article a better score than it's
> friends' article?
>
>
>
> 2010/1/12 Wangsheng Mei <hairr...@gmail.com>
>
> Hi, ALL!
>>
>> I have two tables in database.
>>
>> t_article {
>>    title,
>>    content,
>>    author
>> }
>>
>> t_friend {
>>   person_A,
>>   person_B
>> }
>>
>> note that in t_friend is many-to-many relation。
>>
>> When a logged-in user, search articles with a query word, 3 factors should
>> be considered in.
>> factor 1. relevency score
>> factor 2. if the article is posted by himself, give a higher score
>> factor 3. if the article is posted by it's friend, give a higher score
>>
>> HOW can I boost factor 2 and 3?
>>
>> Thanks very much!
>>
>>
>> --
>> 梅旺生
>>
>
>
>
> --
> 梅旺生
>



-- 
梅旺生

Reply via email to