[
https://issues.apache.org/jira/browse/LUCENE-3707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189102#comment-13189102
]
Robert Muir commented on LUCENE-3707:
-------------------------------------
{quote}
In general I am very sceptical with asserts in code that reads from disk.
{quote}
Right, but this format is not read from disk here.
Once 3.x indexes are no longer supported (5.x), we can actually remove
SegmentInfos.format.
It doesn't need to be an instance variable at that point, in fact I think we
perhaps should deprecate it already.
If codecs want to write version information into their own segments file
format, they can do this themselves.
But currently this is read (and checked) by SegmentInfos, so that it knows
which codec to invoke:
{noformat}
final int format = input.readInt();
setFormat(format);
// check that it is a format we can understand
if (format > FORMAT_MINIMUM)
throw new IndexFormatTooOldException(input, format,
FORMAT_MINIMUM, FORMAT_CURRENT);
if (format < FORMAT_CURRENT)
throw new IndexFormatTooNewException(input, format,
FORMAT_MINIMUM, FORMAT_CURRENT);
if (format <= FORMAT_4_0) {
codecFormat = Codec.forName(input.readString());
} else {
codecFormat = Codec.forName("Lucene3x");
}
{noformat}
> Add a Lucene3x private SegmentInfosFormat implemenation
> -------------------------------------------------------
>
> Key: LUCENE-3707
> URL: https://issues.apache.org/jira/browse/LUCENE-3707
> Project: Lucene - Java
> Issue Type: Task
> Components: core/codecs
> Affects Versions: 4.0
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
> Priority: Blocker
> Fix For: 4.0
>
> Attachments: LUCENE-3707.patch, LUCENE-3707.patch
>
>
> we still don't have a Lucene3x & preflex version of segment infos format. we
> need this before we release 4.0
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]