[
https://issues.apache.org/jira/browse/LUCENE-2891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-2891:
-------------------------------
Attachment: LUCENE-2891.patch
Patch supports -1 passed to IWC.setReaderTermIndexDivisor and randomly sets it
in LuceneTestCase.newIndexWriterConfig() and RandomIndexWriter.
Many tests fail with exceptions like this:
{noformat}
[junit] java.lang.IllegalStateException: terms index was not loaded when
this reader was createde=29178856,total=88990720
[junit] at
org.apache.lucene.index.TermInfosReader.ensureIndexIsRead(TermInfosReader.java:309)
[junit] at
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:215)
[junit] at
org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:208)
[junit] at
org.apache.lucene.index.SegmentTermDocs.seek(SegmentTermDocs.java:57)
Caused an ERROR
[junit] at
org.apache.lucene.index.BufferedDeletes.applyDeletes(BufferedDeletes.java:301)
[junit] at
org.apache.lucene.index.BufferedDeletes.applyDeletes(BufferedDeletes.java:289)ted
[junit] at
org.apache.lucene.index.BufferedDeletes.applyDeletes(BufferedDeletes.java:191):309)
{noformat}
So maybe IWC not supporting -1 is not a bug? I didn't see anywhere, even in
IR.open() what are the consequences of not loading the terms index. Thought it
just means slower term seeks, but apparently it's not supported?
If so, I think we should mention IR.open() what does it mean to not load the
terms index.
> IndexWriterConfig does not allow termInfosDivisor to be -1, while the latest
> indicates TermInfos should not be loaded
> ---------------------------------------------------------------------------------------------------------------------
>
> Key: LUCENE-2891
> URL: https://issues.apache.org/jira/browse/LUCENE-2891
> Project: Lucene - Java
> Issue Type: Bug
> Components: Index
> Reporter: Shai Erera
> Assignee: Shai Erera
> Fix For: 3.1, 4.0
>
> Attachments: LUCENE-2891.patch
>
>
> While you can pass -1 to IR.open(), and it's documented, you cannot do the
> same for IndexWriter's readers (b/c IWC blocks it). Need to allow this
> setting as well as add support for it in our tests, e.g. we should randomly
> set it to -1. Robert also suggested RandomIW use -1 randomly when it opens
> readers.
> I'll work on a patch
--
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: [email protected]
For additional commands, e-mail: [email protected]