You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2011/01/27 21:42:44 UTC

[jira] Updated: (LUCENE-2895) MockRandomCodec loads termsIndex even if termsIndexDivisor is set to -1

     [ https://issues.apache.org/jira/browse/LUCENE-2895?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shai Erera updated LUCENE-2895:
-------------------------------

    Attachment: LUCENE-2895.patch

MockRandom randomly set termsIndexDivisor. Changed it to set it only if it's not already -1, in which case we know someone specifically asked not to load the terms index (such as the test).

Patch includes the fix in MockRandomCodec and removes MockRandom from the set of illegal codecs.

> MockRandomCodec loads termsIndex even if termsIndexDivisor is set to -1
> -----------------------------------------------------------------------
>
>                 Key: LUCENE-2895
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2895
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Codecs
>            Reporter: Shai Erera
>             Fix For: 4.0
>
>         Attachments: LUCENE-2895.patch
>
>
> When working on LUCENE-2891 (on trunk), I found out that if MockRandomCodec is used, then setting IWC.readerTermsIndexDivisor to -1 allows seeking e.g., termDocs, when it shouldn't. Other Codecs fail to seek, as expected by the test. We need to find out why MockRandomCodec does not fail as expected.
> To verify that, run "ant test-core -Dtestcase=TestIndexWriterReader -Dtestmethod=testNoTermsIndex -Dtests.codec=MockRandom", but comment out the line which adds MockRandom to the list of illegal codecs in the test.

-- 
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