lucene-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/LUCENE-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12648077#action_12648077
] 

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:
{code:java}
  synchronized public FieldInfo add(FieldInfo fieldInfo) {
    FieldInfo fi = fieldInfo(fieldInfo.name);
    if (fi == null) {
      return addInternal(fieldInfo.name, fieldInfo.isIndexed, fieldInfo.storeTermVector,
                         fieldInfo.storePositionWithTermVector, fieldInfo.storeOffsetWithTermVector,
                         fieldInfo.omitNorms, fieldInfo.storePayloads, fieldInfo.omitTf);
    } else {
      fi.update(fieldInfo);
    }
    return fi;
  }
{code}

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: https://issues.apache.org/jira/browse/LUCENE-1456
>             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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message