lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Koji Sekiguchi <k...@r.email.ne.jp>
Subject Re: Update boost factor for indexed document using setBoost()
Date Tue, 14 Aug 2007 10:42:45 GMT
Hi Rohit,

The way I showed you doesn't suit your need, because FieldNormModifier
should be used for modifying all fieldNorm values of the field specified 
at the
command line parameter in batch mode.

You can have an extra field other than content and register the point
to the field. Then use FunctionQuery to boost the document.
Note that in order to see the registered point, you have to close
and reopen your searcher instance when modifying the point field.

regards,

Koji

rohit saini wrote:
> Hi koji,
> please give me an example.  Let me explain what I want to do:
> I have indexed some documents. Now I want to update the ranking of the
> documents based on following criteria:
>
> 1.) The documents which come into search result should get one point
> 2.) The documents which are viewed by the user should get one point
> 3.) Boost the document as per the rating (suppose 1-5) given by the user.
>
> I have only one field in my index that is content of the document.
>
> Now how to update the boost factor of the indexed docuements without
> deleting them first from the index.
>
> Thanks & Regards,
> Rohit
>
>
> On 8/10/07, Koji Sekiguchi <koji@r.email.ne.jp> wrote:
>   
>> Or, you can use FieldNormModifier class to modify existing fieldNorm:
>>
>> $ java org.apache.lucene.index.FieldNormModifier path-to-index
>> your.Similarity field1 [field2 ...]
>>
>> To do this, you have to write your own Similarity class to adjust boost,
>> via lengthNorm().
>>
>> Thank you,
>>
>> Koji
>>
>>     


---------------------------------------------------------------------
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