lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apa...@lucene.com
Subject RE: Normalization of Documents
Date Thu, 11 Apr 2002 19:19:03 GMT
> From: Halácsy Péter
>
> What I would like:
> 
>   score_d = sum_t( tf_q * idf_t / norm_q * tf_d * idf_t / 
> norm_d_t) * p_value_d
> 
> where:
> p_value_d : predefined value of document calculated at 
> indexing time (0 < p_value_d <= 1)
> 
> in the API:
> option 1:
> writer = new IndexWriter(..)
> writer.addDocument(doc, 0.45);
> 
> option 2 (I think better)
> 
> Document d = new Document();
> d.setValue(0.45);
> d.addField(..);
> writer.addDocument();

This would not be hard to add to Lucene.  I would like to add it as soon as
we get the 1.2 release finalized.

I also prefer the second style of interface, however the method should
probably be on Field not on Document.  Something like
  Field.setBoost(float);
Perhaps we could also add a Document.setBoost(float) method which would
provide a default boost for all fields added to that document.

Doug

--
To unsubscribe, e-mail:   <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message