lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Date Wed, 05 Mar 2008 09:06:36 GMT

Correct, they are logically orthogonal, and I agree the API is  
somewhat confusing since "NO_NORMS" is mixing up two things.

To get a tokenized field without norms you can create the field with  
Index.TOKENIZED, and then call setOmitNorms(true).

Note that norms "spread" during merges, so, if you really want  
NO_NORMS for a given field X then every doc in the index must have  
its field X indexed with NO_NORMS.  Ie, build a clean index if you  
decide to turn off norms for field X.


Tobias Hill wrote:

> Hi,
> I am quite new to the Lucene API. I find the Field-constructor
> unintuitive. Maybe I have misunderstood it. Let's find out...
> It can be used either as:
> new Field("field", "data", Store.NO, TOKENIZED)
> or:
> new Field("field", "data", Store.NO, NO_NORM)
> As I understand it NO_NORM and TOKENIZED are not settings for
> a one-dimensional behaviour - on the contrary they are rather
> orthogonal.
> I.e. it is quite likely that I would want _both_ TOKENIZED and  
> This is especially true for fields that are of approx. equal and  
> short length
> over the doc-space.
> - Am I right in my reasoning (which means that the API is a bit  
> unclear)?
> Or
> - Have I misunderstood something fundamental about TOKENIZED and  
> Thankful for any feedback on this,
> Tobias
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message