You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by sandeep chawla <sa...@gmail.com> on 2007/10/16 13:07:33 UTC

Number of terms

Hi,

While calculating the lengthnorm- there is a precision-loss.
http://lucene.apache.org/java/docs/scoring.html#Score%20Boosting
How to avoid the precision loss?

Thanks
Sandeep

-- 
SANDEEP CHAWLA
House No- 23
10th main
BTM 1st  Stage
Bangalore Mobile: 91-9986150603

Re: Number of terms

Posted by sandeep chawla <sa...@gmail.com>.
Thanks a lot

but one question- IndexOutput  class doesn't  have a method writeFloat ?
How do u write float to index..

shall i create  public method writeFloat as

public void writeFloat(float f) {
    writeByte((byte)(f >>32);
     writeByte((byte)(f >>16);
    writeByte((byte)(f >>8);
    writeByte((byte)(f );
}

~sandeep

On 16/10/2007, Karl Wettin <ka...@gmail.com> wrote:
>
>
> 16 okt 2007 kl. 13.07 skrev sandeep chawla:
>
> > While calculating the lengthnorm- there is a precision-loss.
> > http://lucene.apache.org/java/docs/scoring.html#Score%20Boosting
> > How to avoid the precision loss?
>
> You replace the use of bytes to floats when storing the norms
> (DocumentsWriter) in the file and accessing them via the IndexReader,
> plus all aggregated use of the use of byte-norms from the
> IndexReader. Search for use of Similarity.en/deccodeNorm()
>
>
> --
> karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
SANDEEP CHAWLA
House No- 23
10th main
BTM 1st  Stage
Bangalore Mobile: 91-9986150603

Re: Number of terms

Posted by Karl Wettin <ka...@gmail.com>.
16 okt 2007 kl. 13.07 skrev sandeep chawla:

> While calculating the lengthnorm- there is a precision-loss.
> http://lucene.apache.org/java/docs/scoring.html#Score%20Boosting
> How to avoid the precision loss?

You replace the use of bytes to floats when storing the norms  
(DocumentsWriter) in the file and accessing them via the IndexReader,  
plus all aggregated use of the use of byte-norms from the  
IndexReader. Search for use of Similarity.en/deccodeNorm()


-- 
karl

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org