lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Updated] (LUCENE-5762) Disable old codecs as much as possible
Date Sun, 15 Jun 2014 14:41:01 GMT


Robert Muir updated LUCENE-5762:

    Attachment: LUCENE-5762.patch

Attached is a patch: 

Lucene42Norms is made read-only with a read-write version in test-framework.

Lucene45DocValues has a check like this that it does when it goes to write a field:
  void checkCanWrite(FieldInfo field) {
    if ((field.getDocValuesType() == DocValuesType.NUMERIC || 
        field.getDocValuesType() == DocValuesType.BINARY) && 
        field.getDocValuesGen() != -1) {
      // ok
    } else {
      throw new UnsupportedOperationException("this codec can only be used for reading");

And of course a read-write version in test-framework that just allows anything.

> Disable old codecs as much as possible
> --------------------------------------
>                 Key: LUCENE-5762
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-5762.patch
> Currently, because of updatable docvalues, ancient codecs are not really read-only...
this is a real problem because we can get confused about backwards compatibility or even introduce
> Its only necessary to make BINARY and NUMERIC work here, we should throw UOE every other
possible place and prevent use of old codecs to the greatest extent possible.

This message was sent by Atlassian JIRA

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

View raw message