lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-6006) Replace FieldInfo.normsType with FieldInfo.hasNorms boolean
Date Wed, 15 Oct 2014 16:31:33 GMT

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

Michael McCandless updated LUCENE-6006:
---------------------------------------
    Attachment: LUCENE-6006.patch

Good idea Rob ... I factored out the undead handling into a new UndeadNormsProducer, and added
static methods that per-version formats invoke.

I also added support & test for Lucene49NormsFormat, which can also be confronted by undead
norms.

I think it's ready.  This is the world's most difficult-to-eliminate "useless" boolean!

> Replace FieldInfo.normsType with FieldInfo.hasNorms boolean
> -----------------------------------------------------------
>
>                 Key: LUCENE-6006
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6006
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, Trunk
>
>         Attachments: LUCENE-6006.patch, LUCENE-6006.patch, LUCENE-6006.patch, LUCENE-6006.patch,
LUCENE-6006.patch
>
>
> I came across this precursor while working on LUCENE-6005:
> I think FieldInfo.normsType can only be null (field did not index
> norms) or DocValuesType.NUMERIC (it did).  I'd like to simplify to
> just boolean hasNorms.
> This is a strange boolean, though: in theory it should be derived from
> {{indexed && omitNorms == false}}, but we have it for the exceptions
> case where every document in a segment hit an exception and never
> added norms.  I think this is the only reason it exists?  (In theory,
> such cases should result in 100% deleted segments, which IW should
> then drop ... but seems dangerous to "rely" on that).
> So I changed the indexing chain to just fill in the default (0) norms
> for all documents in such exceptional cases; this way going forward
> (starting with 5.0 indices) we really don't need this hasNorms.  But
> we still need it for pre-5.0 indices...



--
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


Mime
View raw message