You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2014/09/30 00:45:34 UTC

[jira] [Updated] (LUCENE-5978) don't write a norm of infinity when analyzer returns no tokens

     [ https://issues.apache.org/jira/browse/LUCENE-5978?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Muir updated LUCENE-5978:
--------------------------------
    Attachment: LUCENE-5978.patch

here's a patch with a test.

> don't write a norm of infinity when analyzer returns no tokens
> --------------------------------------------------------------
>
>                 Key: LUCENE-5978
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5978
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-5978.patch
>
>
> When a document doesn't have the field, we fill with zero. when a segment doesn't have the field, we also fill with zero.
> however, when the analyzer doesn't return any terms for the field, we still call similarity.computeNorm(0)... with the default similarity this encodes infinity... -1
> in such a case, it doesnt really matter what the norm is, since it has no terms. But its more efficient for e.g. compression if we consistently use zero.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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