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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]