You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Simon Willnauer (JIRA)" <ji...@apache.org> on 2010/12/08 14:50:01 UTC

[jira] Resolved: (LUCENE-2802) DirectoryReader ignores NRT SegmentInfos in #isOptimized()

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

Simon Willnauer resolved LUCENE-2802.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.1

Ported back to 3x in revision 1043418.


> DirectoryReader ignores NRT SegmentInfos in #isOptimized()
> ----------------------------------------------------------
>
>                 Key: LUCENE-2802
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2802
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: Search
>    Affects Versions: 3.1, 4.0
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>             Fix For: 3.1, 4.0
>
>         Attachments: LUCENE-2802.patch, LUCENE-2802.patch, LUCENE-2802.patch
>
>
> DirectoryReader  only takes shared (with IW) SegmentInfos into account in DirectoryReader#isOptimized(). This can return true even if the actual realtime reader sees more than one segments. 
> {code}
> public boolean isOptimized() {
>     ensureOpen();
>    // if segmentsInfos changes in IW this can return false positive
>     return segmentInfos.size() == 1 && !hasDeletions();
>   }
> {code}
> DirectoryReader should check if this reader has a non-nul segmentInfosStart and use that instead

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