You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Bill Herbert (JIRA)" <ji...@apache.org> on 2010/05/06 06:13:47 UTC

[jira] Created: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
----------------------------------------------------------------------------------------------------------------------------

                 Key: LUCENE-2448
                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
             Project: Lucene - Java
          Issue Type: Bug
    Affects Versions: 2.9.1
         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
            Reporter: Bill Herbert


The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.

Thanks,  Bill

C:\lucene-3.0.1\src>javac AddressBookSearcher.java
Note: AddressBookSearcher.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

C:\lucene-3.0.1\src>java AddressBookSearcher
Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
atible format version: 2 expected 1 or lower
        at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
        at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
ntReader.java:277)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
        at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
        at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
04)
        at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
:76)
        at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
s.java:704)
        at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)

        at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
        at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
        at AddressBookSearcher.main(AddressBookSearcher.java:22)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864659#action_12864659 ] 

Shai Erera commented on LUCENE-2448:
------------------------------------

Bill - what is the Lucene version which you use to read the index (lucene .jar) and what was the version the index was created with?

> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2448
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.1
>         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
>            Reporter: Bill Herbert
>         Attachments: _0.cfs, _0.cfx, AddressBookSearcher.java, segments.gen, segments_2
>
>
> The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.
> Thanks,  Bill
> C:\lucene-3.0.1\src>javac AddressBookSearcher.java
> Note: AddressBookSearcher.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> C:\lucene-3.0.1\src>java AddressBookSearcher
> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
> atible format version: 2 expected 1 or lower
>         at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>         at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
> ntReader.java:277)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>         at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
> 04)
>         at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
> :76)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
> s.java:704)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
>         at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
>         at AddressBookSearcher.main(AddressBookSearcher.java:22)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Posted by "Bill Herbert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Herbert updated LUCENE-2448:
---------------------------------

    Attachment: segments_2

> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2448
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.1
>         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
>            Reporter: Bill Herbert
>         Attachments: _0.cfs, _0.cfx, AddressBookSearcher.java, segments.gen, segments_2
>
>
> The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.
> Thanks,  Bill
> C:\lucene-3.0.1\src>javac AddressBookSearcher.java
> Note: AddressBookSearcher.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> C:\lucene-3.0.1\src>java AddressBookSearcher
> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
> atible format version: 2 expected 1 or lower
>         at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>         at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
> ntReader.java:277)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>         at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
> 04)
>         at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
> :76)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
> s.java:704)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
>         at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
>         at AddressBookSearcher.main(AddressBookSearcher.java:22)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Posted by "Bill Herbert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Herbert updated LUCENE-2448:
---------------------------------

    Attachment: _0.cfs
                _0.cfx
                segments.gen

> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2448
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.1
>         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
>            Reporter: Bill Herbert
>         Attachments: _0.cfs, _0.cfx, AddressBookSearcher.java, segments.gen, segments_2
>
>
> The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.
> Thanks,  Bill
> C:\lucene-3.0.1\src>javac AddressBookSearcher.java
> Note: AddressBookSearcher.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> C:\lucene-3.0.1\src>java AddressBookSearcher
> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
> atible format version: 2 expected 1 or lower
>         at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>         at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
> ntReader.java:277)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>         at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
> 04)
>         at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
> :76)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
> s.java:704)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
>         at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
>         at AddressBookSearcher.main(AddressBookSearcher.java:22)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Posted by "Bill Herbert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12864786#action_12864786 ] 

Bill Herbert commented on LUCENE-2448:
--------------------------------------

Shai,
The index was created using lucene-core-3.0.1.jar, while IAddressBookSearcher uses lucene-core-2.9.1.jar.  I tried using 2.9.1 to read the index but got 4 errors instead oif the 1 that resulted from 2.9.1.
Thanks,
Bill

> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2448
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.1
>         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
>            Reporter: Bill Herbert
>         Attachments: _0.cfs, _0.cfx, AddressBookSearcher.java, segments.gen, segments_2
>
>
> The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.
> Thanks,  Bill
> C:\lucene-3.0.1\src>javac AddressBookSearcher.java
> Note: AddressBookSearcher.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> C:\lucene-3.0.1\src>java AddressBookSearcher
> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
> atible format version: 2 expected 1 or lower
>         at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>         at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
> ntReader.java:277)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>         at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
> 04)
>         at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
> :76)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
> s.java:704)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
>         at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
>         at AddressBookSearcher.main(AddressBookSearcher.java:22)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Closed: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Posted by "Uwe Schindler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler closed LUCENE-2448.
---------------------------------

    Resolution: Invalid

This is not a bug.

Lucene 3.0 changed the stored fields to no longer support compressed fields. To mark an already "converted" (removed compression) stored fields file, the version is upgraded to the 3.0 one. Lucene 2.9 is then no longer able to read the index because of the upgraded version.

Theoretically it could - when i implemented the stored field upgrade with Michael Busch, I thought about adding support for the higher version as an "alias" to 2.9, but the release schedule for 2.9 was too fast. The best solution would be to force 2.9 to *always* write stored field segments with the old version, but 2.9 should also be able to *readonly* the new version signature.

> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2448
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.1
>         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
>            Reporter: Bill Herbert
>         Attachments: _0.cfs, _0.cfx, AddressBookSearcher.java, segments.gen, segments_2
>
>
> The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.
> Thanks,  Bill
> C:\lucene-3.0.1\src>javac AddressBookSearcher.java
> Note: AddressBookSearcher.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> C:\lucene-3.0.1\src>java AddressBookSearcher
> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
> atible format version: 2 expected 1 or lower
>         at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>         at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
> ntReader.java:277)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>         at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
> 04)
>         at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
> :76)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
> s.java:704)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
>         at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
>         at AddressBookSearcher.main(AddressBookSearcher.java:22)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (LUCENE-2448) Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower

Posted by "Bill Herbert (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENE-2448?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bill Herbert updated LUCENE-2448:
---------------------------------

    Attachment: AddressBookSearcher.java

> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incompatible format version: 2 expected 1 or lower
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2448
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2448
>             Project: Lucene - Java
>          Issue Type: Bug
>    Affects Versions: 2.9.1
>         Environment: Windows Vista Home Premium, Lucene version 2.9.1, JRE6
>            Reporter: Bill Herbert
>         Attachments: AddressBookSearcher.java
>
>
> The attached code is indended to search the contents of an indexed file.  Upon execution, it generates the following stacktrace.  I will appreciate any assistance in interpreting and correcting this error.  Also, how should I address the warning about the depreciated API.
> Thanks,  Bill
> C:\lucene-3.0.1\src>javac AddressBookSearcher.java
> Note: AddressBookSearcher.java uses or overrides a deprecated API.
> Note: Recompile with -Xlint:deprecation for details.
> C:\lucene-3.0.1\src>java AddressBookSearcher
> Exception in thread "main" org.apache.lucene.index.CorruptIndexException: Incomp
> atible format version: 2 expected 1 or lower
>         at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:117)
>         at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(Segme
> ntReader.java:277)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:640)
>         at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
>         at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:1
> 04)
>         at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java
> :76)
>         at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfo
> s.java:704)
>         at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:243)
>         at org.apache.lucene.index.IndexReader.open(IndexReader.java:222)
>         at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:62)
>         at AddressBookSearcher.main(AddressBookSearcher.java:22)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org