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 Karl Wettin <ka...@gmail.com> on 2008/04/05 02:33:21 UTC

document boost and omitted norms

Is it so that document and field boosts are omitted together with 
Field#setOmitNorms? By setting lengthNorm to 1f in the Similarity for 
these fields and not omitting norms would fix it?


     karl

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


Re: document boost and omitted norms

Posted by Karl Wettin <ka...@gmail.com>.
Karl Wettin skrev:
> Michael McCandless skrev:
>> Karl Wettin wrote:
>>> Is it so that document and field boosts are omitted together with 
>>> Field#setOmitNorms? By setting lengthNorm to 1f in the Similarity for 
>>> these fields and not omitting norms would fix it?
>> >
>> Yes and yes.
> 
> I'm not sure if I do these things backwards or what, but in this case 
> the resolution of the 8 bit float of norms is not enough for me.
> 
> So I patched the norms float table in Similarity to handle the boost 
> values I assign my documents. Discretized 100f-250f in 60 bags and 
> cought up with the default table in 16 more bags.
> 
> But to me it seem as this only works if I also turn off length 
> normalization for all the other fields in my index, as they will affect 
> the value of the norm?
> 
> I could store it in the payloads of my tokens too, but I really don't 
> want payloads on all of them.
> 
> Now I'm thinking it would be nice to store a full float in an optional 
> document boost file. Perhaps with variable bytesize. But that would take 
> a lot of effort to update all related code.
> 
> Is there an easier way out here? Perhaps variable byte size per norms 
> and field? Document payloads? I don't know. Help much appreciated.
> 

PS

What I really try to do is to add a weight to each document based on a 
number of values in the domain object it represents. As I only want to 
add this weight to the documents that match the query I don't can't add 
a query with boosts on these values as that would match all documents.


     karl



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


Re: document boost and omitted norms

Posted by Karl Wettin <ka...@gmail.com>.
Michael McCandless skrev:
> Karl Wettin wrote:
>> Is it so that document and field boosts are omitted together with 
>> Field#setOmitNorms? By setting lengthNorm to 1f in the Similarity for 
>> these fields and not omitting norms would fix it?
> >
> Yes and yes.

I'm not sure if I do these things backwards or what, but in this case 
the resolution of the 8 bit float of norms is not enough for me.

So I patched the norms float table in Similarity to handle the boost 
values I assign my documents. Discretized 100f-250f in 60 bags and 
cought up with the default table in 16 more bags.

But to me it seem as this only works if I also turn off length 
normalization for all the other fields in my index, as they will affect 
the value of the norm?

I could store it in the payloads of my tokens too, but I really don't 
want payloads on all of them.

Now I'm thinking it would be nice to store a full float in an optional 
document boost file. Perhaps with variable bytesize. But that would take 
a lot of effort to update all related code.

Is there an easier way out here? Perhaps variable byte size per norms 
and field? Document payloads? I don't know. Help much appreciated.



     karl


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


Re: document boost and omitted norms

Posted by Michael McCandless <lu...@mikemccandless.com>.
Yes and yes.

Mike

Karl Wettin wrote:
> Is it so that document and field boosts are omitted together with  
> Field#setOmitNorms? By setting lengthNorm to 1f in the Similarity  
> for these fields and not omitting norms would fix it?
>
>
>     karl
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>


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