lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Busch (JIRA)" <>
Subject [jira] Commented: (LUCENE-1456) FieldInfo omitTerms bug
Date Mon, 17 Nov 2008 04:18:44 GMT


Michael Busch commented on LUCENE-1456:

Good eyes Mark! 

I was wondering why this didn't result in any unit test failures and it turns out that the
only method that calls FieldInfo#update(FieldInfo) is this one in FieldInfos:
  synchronized public FieldInfo add(FieldInfo fieldInfo) {
    FieldInfo fi = fieldInfo(;
    if (fi == null) {
      return addInternal(, fieldInfo.isIndexed, fieldInfo.storeTermVector,
                         fieldInfo.storePositionWithTermVector, fieldInfo.storeOffsetWithTermVector,
                         fieldInfo.omitNorms, fieldInfo.storePayloads, fieldInfo.omitTf);
    } else {
    return fi;

However, nowhere in Lucene's core is this add(FieldInfo) method called. Also all contrib modules
build successfully if I remove this method. Does anybody know why we have the method in the
core? It seems like we can just remove it?

> FieldInfo omitTerms bug
> -----------------------
>                 Key: LUCENE-1456
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Priority: Minor
> Around line 95 you have:
>     if (this.omitTf != omitTf) {
>       this.omitTf = true;                // if one require omitTf at least once, it remains
off for life
>     }
> Both references of the omitTf booleans in the if statement refer to the same field. I
am guessing its meant to be other.omitTf like the norms code above it.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

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

View raw message