lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "sendtoprat@yahoo.co.in" <sendtop...@yahoo.co.in>
Subject Re: Modify Norm
Date Thu, 12 Feb 2009 20:46:56 GMT

I guess I could use, 	String[] s =
ExtendedFieldCache.EXT_DEFAULT.getStrings(reader, fieldname);
It will consume memory but should not be that bad. For my index this field
has sortable string value which I could use in my model. I only need to do
this for one field. Comment ?

Pratyush

Michael McCandless-2 wrote:
> 
> 
> [You'd probably get more responses on java-user@ instead of general@]
> 
> Could you use per-field boost?
> 
> Or, since it sounds like you have a separate field with the boost you  
> want,
> maybe you could do this all at search time using a function query?
> 
> An advanced possibility is to make your own indexing chain, and use a  
> different
> NormsWriter, but that's an extremely big hammer to pull out for this  
> nail.
> 
> Mike
> 
> sendtoprat@yahoo.co.in wrote:
> 
>>
>> Hi
>> How can I set my own norm value during indexing time. From my quick  
>> reading
>> of code, I believe that norm values are written by NormsWriter class  
>> which
>> is called from final class DocumentsWriter. Norm values are set by  
>> calling
>> org.apache.lucene.search.Similarity#lengthNorm(String fieldName, int
>> numTokens). But I need to set the norm using the field value which  
>> is a
>> float number. I will be using this norm for my retrieval model. I  
>> cannot use
>> document.setBoost(), as i need to boost the fields differently.
>>
>> thanks
>> Pratyush
>> -- 
>> View this message in context:
>> http://www.nabble.com/Modify-Norm-tp21959177p21959177.html
>> Sent from the Lucene - General mailing list archive at Nabble.com.
>>
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Modify-Norm-tp21959177p21984666.html
Sent from the Lucene - General mailing list archive at Nabble.com.


Mime
View raw message