lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-2983) FieldInfos should be read-only if loaded from disk
Date Thu, 24 Mar 2011 17:04:05 GMT


Michael McCandless commented on LUCENE-2983:

Patch looks great Simon!

> FieldInfos should be read-only if loaded from disk
> --------------------------------------------------
>                 Key: LUCENE-2983
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Minor
>             Fix For: 4.0
>         Attachments: LUCENE-2983.patch
> Currently FieldInfos create a private FieldNumberBiMap when they are loaded from a directory
which is necessary due to some limitation we need to face with IW#addIndexes(Dir). If we add
an index via a directory to an existing index field number can conflict with the global field
numbers in the IW receiving the directories. Those field number conflicts will remain until
those segments are merged and we stabilize again based on the IW global field numbers. Yet,
we unnecessarily creating a BiMap here where we actually should enforce read-only semantics
since nobody should modify this FieldInfos instance we loaded from the directory. If somebody
needs to get a modifiable copy they should simply create a new one and all all FieldInfo instances
to it.

This message is automatically generated by JIRA.
For more information on JIRA, see:

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

View raw message