lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Per-Field Similarity
Date Tue, 23 May 2006 22:03:57 GMT

: Refactor :
:
: class DocumentWriter {
:   private final void writeNorms(String segment) throws IOException {
:     for(int n = 0; n < fieldInfos.size(); n++){
:       FieldInfo fi = fieldInfos.fieldInfo(n);
:       if(fi.isIndexed && !fi.omitNorms){
:         float norm = fieldBoosts[n] * similarity.lengthNorm(fi.name,
:
: to this:
:         float norm = fieldBoosts[n] * fi.similarity.lengthNorm(fi.name,

Why wouldn't you just provide your own Similarity instance that looked at
the fieldName passed to the lengthNorm method?


-Hoss


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


Mime
View raw message