lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <yo...@apache.org>
Subject Re: NO_NORMS and TOKENIZED?
Date Tue, 23 Jan 2007 15:24:58 GMT
On 1/23/07, Nadav Har'El <nyh@math.technion.ac.il> wrote:
> Hi,
>
> When adding a field to a document, Field.Index gives me four options: NO,
> NO_NORMS, TOKENIZED and UN_TOKENIZED.
>
> NO_NORMS means, according to the documentation "index the field's value
> without an Analyzer, and disable the storing of norms."
>
> What can I do if I want to index the field's value *with* an Analyzer, but
> still disable the storing of norms (because the field length should not be
> considered in scoring)?

That works fine.

> Can't I do that? Was this intentional, or is this
> an oversight and a fifth option should be added?

Yes, that was intentional.
see http://issues.apache.org/jira/browse/LUCENE-448

I hadn't added a Field.Index option at all, and Doug suggested
NO_NORMS, probably because it's mostly harmless to new users who might
disable length normalization without realizing the implications.

For other fields, I prefer use of setOmitNorms()

-Yonik

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


Mime
View raw message