You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2009/07/10 14:33:14 UTC
[jira] Resolved: (LUCENE-1739) 2.4.x index cannot be opened with
2.9-dev
[ https://issues.apache.org/jira/browse/LUCENE-1739?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael McCandless resolved LUCENE-1739.
----------------------------------------
Resolution: Fixed
Thanks Robert! Keep testing ;)
> 2.4.x index cannot be opened with 2.9-dev
> -----------------------------------------
>
> Key: LUCENE-1739
> URL: https://issues.apache.org/jira/browse/LUCENE-1739
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Reporter: Robert Muir
> Assignee: Michael McCandless
> Fix For: 2.9
>
>
> Sorry for the lack of proper testcase.
> In 2.4.1, if you created an index with the (stupid) options below, then it will not create a .prx file. 2.9 expects this file and will not open the index.
> The reason i used these stupid options is because i changed the field from indexed=yes to indexed=no, but forgot to remove the .setOmitTf()
> {code}
> public class Testcase {
> public static void main(String args[]) throws Exception {
> /* run this part with lucene 2.4.1 */
> IndexWriter iw = new IndexWriter("test", new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
> iw.setUseCompoundFile(false);
> Document doc = new Document();
> Field field1 = new Field("field1", "foo", Field.Store.YES, Field.Index.NO);
> field1.setOmitTf(true); // 2.9 will create a 0-byte .prx file, but 2.4.x will NOT. This is the problem. 2.9 expects this file!
> doc.add(field1);
> iw.addDocument(doc);
> iw.close();
> /* run this with lucene 2.9 */
> IndexReader ir = IndexReader.open(FSDirectory.getDirectory("test"), true);
> }
> }
> {code}
--
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: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org