lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sandeep chawla" <sand.cha...@gmail.com>
Subject Re: Number of terms
Date Tue, 16 Oct 2007 13:31:51 GMT
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 <karl.wettin@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message