You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by codejunky codejunky <co...@yahoo.com> on 2006/01/11 19:04:15 UTC
Document.GetBoost( ) always returns 1 even if I SetBoost( ) = 2
When I setBoost( ) on a document to 1. It seems to be written to the index with the new value and the field boost is set within the DocumentWriter.cs class. But when I call GetBoost( ) it always returns the default boost value of 1, no matter what value was set for the boost. However it does seem that the new document boost that was is being written to the specific segment, but I can't later retrieve that value. Is there a way to get the correct boost value that was set by the previous caller.
thanks
-thomas
---------------------------------
Yahoo! Photos Showcase holiday pictures in hardcover
Photo Books. You design it and well bind it!
Re: Document.GetBoost( ) always returns 1 even if I SetBoost( ) = 2
Posted by codejunky codejunky <co...@yahoo.com>.
Andrzej, thanks for the quick response. So does that mean that when I retrieve the document via the Indexsearcher, the boost has been applied even though I cant retrieve it? If so, what I am ascertaining is that if I SetBoost( ) on a document even if I can't retrieve the value of the boost, I can be assured the proper scoring is applied?
thanks again,
-thomas
Andrzej Bialecki <ab...@getopt.org> wrote: codejunky codejunky wrote:
>When I setBoost( ) on a document to 1. It seems to be written to the index with the new value and the field boost is set within the DocumentWriter.cs class. But when I call GetBoost( ) it always returns the default boost value of 1, no matter what value was set for the boost. However it does seem that the new document boost that was is being written to the specific segment, but I can't later retrieve that value. Is there a way to get the correct boost value that was set by the previous caller.
>
>
This is normal and expected. The boost value is stored inside a so
called "field norm" value, which affects the scoring (according to the
original boost), but the original boost is not preserved in the index,
so when you later retrieve the document the boost is set to 1.
--
Best regards,
Andrzej Bialecki <><
___. ___ ___ ___ _ _ __________________________________
[__ || __|__/|__||\/| Information Retrieval, Semantic Web
___|||__|| \| || | Embedded Unix, System Integration
http://www.sigram.com Contact: info at sigram dot com
---------------------------------
Yahoo! Photos
Ring in the New Year with Photo Calendars. Add photos, events, holidays, whatever.
Re: Document.GetBoost( ) always returns 1 even if I SetBoost( ) =
2
Posted by Andrzej Bialecki <ab...@getopt.org>.
codejunky codejunky wrote:
>When I setBoost( ) on a document to 1. It seems to be written to the index with the new value and the field boost is set within the DocumentWriter.cs class. But when I call GetBoost( ) it always returns the default boost value of 1, no matter what value was set for the boost. However it does seem that the new document boost that was is being written to the specific segment, but I can't later retrieve that value. Is there a way to get the correct boost value that was set by the previous caller.
>
>
This is normal and expected. The boost value is stored inside a so
called "field norm" value, which affects the scoring (according to the
original boost), but the original boost is not preserved in the index,
so when you later retrieve the document the boost is set to 1.
--
Best regards,
Andrzej Bialecki <><
___. ___ ___ ___ _ _ __________________________________
[__ || __|__/|__||\/| Information Retrieval, Semantic Web
___|||__|| \| || | Embedded Unix, System Integration
http://www.sigram.com Contact: info at sigram dot com
Re: Document.GetBoost( ) always returns 1 even if I SetBoost( ) = 2
Posted by Yonik Seeley <ys...@gmail.com>.
Boost gets folded in with some other factors at index time and affects
the scoring of search results. You can't get back the original
though.
-Yonik
On 1/11/06, codejunky codejunky <co...@yahoo.com> wrote:
> When I setBoost( ) on a document to 1. It seems to be written to the index with the new value and the field boost is set within the DocumentWriter.cs class. But when I call GetBoost( ) it always returns the default boost value of 1, no matter what value was set for the boost. However it does seem that the new document boost that was is being written to the specific segment, but I can't later retrieve that value. Is there a way to get the correct boost value that was set by the previous caller.
>
>
> thanks
> -thomas