[
https://issues.apache.org/jira/browse/LUCENE-6039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Michael McCandless updated LUCENE-6039:
---------------------------------------
Attachment: LUCENE-6039.patch
Patch, tests pass, but this is really quite a dangerous change since I
could easily (and likely did) miss places in the code that still think
null means "not indexed" or "no doc values".
I tried adding @NotNull annotations and ran code inspection with
Intellij but was unable to get anything useful out of it: blatant
violations weren't caught, and trivial things were caught, or maybe
I just ran it wrong... If anyone has experience getting \@NotNull/NonNull
to report useful issues please help :)
I also pulled DocValuesType and IndexOptions out of FieldInfo.java
into their own sources (in oal.index), and renamed
IndexOptions.DOCS_ONLY -> DOCS.
> Add IndexOptions.NO and DocValuesType.NO, instead of null
> ---------------------------------------------------------
>
> Key: LUCENE-6039
> URL: https://issues.apache.org/jira/browse/LUCENE-6039
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Michael McCandless
> Assignee: Michael McCandless
> Fix For: 5.0, Trunk
>
> Attachments: LUCENE-6039.patch
>
>
> Idea from Simon: it seems dangerous for IndexOptions and DocValuesType
> via Indexable/FieldType and FieldInfo that we use null to mean it's
> not indexed or has no doc values.
> We should instead have an explicit choice (IndexOptions.NO,
> DocValuesType.NO) in the enum?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]