lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From karl wettin <ka...@snigel.net>
Subject boosting fields
Date Tue, 25 Apr 2006 16:56:00 GMT
I don't like how fields are configured.

     Document doc = new Document();
     Field f;
     f = new Field("foo", "bar tzar", Field.Store.NO,  
Field.Index.TOKENIZED, Field.TermVector.YES);
     f.setBoost(1.5f);
     doc.add(f);
     f = new Field("foo", "blah yada", Field.Store.NO,  
Field.Index.TOKENIZED, Field.TermVector.WITH_POSITIONS);
     f.setBoost(2f);
     doc.add(f);

This could lead me to believe I can use different boost for fields  
with the same name within one document. I guess it is nice that I can  
set it up so that different subsets of the terms are stored a  
specific way in the term vector, even though I never had to use it.  
But the boosts are stored by field name, right? There are no  
constraints in the code. I would at least expect a warning when  
indexing above document.

How about refactoring fields to something like:

[Document](fieldName)<#>---- {0..1} ->[Field +boost]<#>---- {0..*} -> 
[FieldValue +store +index +termVector]

instead of as now:

[Document](fieldName)<#>---- {0..1} ->[Field +boost +store +index  
+termVector]

I would not mind if it worked the way the design implies, but it  
doesn't. Right?

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


Mime
View raw message