8

I know what does not_analyzed mean. In short the field will not be tokenized by specified Analyzer.

However, what does a NO_NORMS means? I see the documentation, but please explain me in plain English. what is index-time field and document boosting and field length normalization ?

ankitjaininfo
  • 11,961
  • 7
  • 52
  • 75
  • Hijacking this question for a little one of my own. What is difference between Field.Index.NOT_ANALYZED_NO_NORMS and Fieldable.SetOmitNorms() method? – Andy McCluggage Dec 12 '12 at 15:30

1 Answers1

10

It disables the following features:

  • index-time field and document boosting: this means that the index will ignore any boosts you did to fields (AbstractField.setBoost) or documents (Document.setBoost). A matching token will always be worth the same.
  • field length normalization: this means that the index will ignore whether a matching token was in a short field (which should be more relevant) vs. a long field (less relevant). Again, a matching token will always be worth the same, no matter the length of the field.
Martin Blech
  • 13,135
  • 6
  • 31
  • 35
  • so in short a field marked as NO_NORMS does not affect ranking of result at all, is that what this mean? – ankitjaininfo Sep 07 '10 at 18:03
  • This is inexact. If a field is marked as NO_NORM, term matches on it DO affect ranking. Just its boost and length do not. – Yuval F Sep 08 '10 at 06:53
  • I didn't mean that a matching term doesn't affect ranking, I meant that it does in the same magnitude, no matter the field's length. – Martin Blech Sep 08 '10 at 08:06
  • Great answer. Do you the difference between Field.Index.NOT_ANALYZED_NO_NORMS and the Fieldable.SetOmitNorms() method? – Andy McCluggage Dec 12 '12 at 15:31