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 maureen tanuwidjaja <au...@yahoo.com> on 2007/03/13 16:13:33 UTC

How to disable lucene norm factor?

Hi all,
  How to disable lucene norm factor?
  
  Thanks,
  Maureen



 
---------------------------------
We won't tell. Get more on shows you hate to love
(and love to hate): Yahoo! TV's Guilty Pleasures list.

Re: How to disable lucene norm factor?

Posted by maureen tanuwidjaja <au...@yahoo.com>.
ok mike.I'll try it and see wheter could work :) then I will proceed to optimize the index.
  Well then i guess it's fine to use the default value for maxMergeDocs which is INTEGER.MAX?
  
  Thanks a lot
  
  Regards,
  Maureen
  

Michael McCandless <lu...@mikemccandless.com> wrote:  
"maureen tanuwidjaja"  wrote:

>   How to disable lucene norm factor?

Once you've created a Field and before adding to your Document
index, just call field.setOmitNorms(true).

Note, however, that you must do this for all Field instances by that
same field name because whenever Lucene merges segments, if even one
Document did not disable norms then this will "spread" so that all documents
keep their norms, for the same field name.

Ie you must fully rebuild your index with the above code change to
truly not store norms.

Mike

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



 
---------------------------------
Bored stiff? Loosen up...
Download and play hundreds of games for free on Yahoo! Games.

Re: How to disable lucene norm factor?

Posted by Michael McCandless <lu...@mikemccandless.com>.
"maureen tanuwidjaja" <au...@yahoo.com> wrote:

>   How to disable lucene norm factor?

Once you've created a Field and before adding to your Document
index, just call field.setOmitNorms(true).

Note, however, that you must do this for all Field instances by that
same field name because whenever Lucene merges segments, if even one
Document did not disable norms then this will "spread" so that all documents
keep their norms, for the same field name.

Ie you must fully rebuild your index with the above code change to
truly not store norms.

Mike

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