You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Jason Rutherglen (JIRA)" <ji...@apache.org> on 2009/07/14 02:44:14 UTC

[jira] Created: (LUCENE-1742) Wrap SegmentInfos in public class

Wrap SegmentInfos in public class 
----------------------------------

                 Key: LUCENE-1742
                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
             Project: Lucene - Java
          Issue Type: Improvement
            Reporter: Jason Rutherglen


Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Commented: (LUCENE-1742) Wrap SegmentInfos in public class

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732702#action_12732702 ] 

Michael McCandless commented on LUCENE-1742:
--------------------------------------------

Latest patch looks good Jason!  I'll commit soon.

bq. since it's new I guess we don't want people relying on it?

Right, and, we haven't thought about / tested for users randomly checking out readers from a writer at different times, it'd make me nervous to expose that now.

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Michael McCandless updated LUCENE-1742:
---------------------------------------

    Fix Version/s:     (was: 3.0)
                   2.9

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Jason Rutherglen updated LUCENE-1742:
-------------------------------------

    Attachment: LUCENE-1742.patch

* Added IW.numDeletedDocs method which LogMergePolicy uses to obtain the delCount of an info

* Updated to trunk

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Commented: (LUCENE-1742) Wrap SegmentInfos in public class

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732042#action_12732042 ] 

Michael McCandless commented on LUCENE-1742:
--------------------------------------------

I don't think we should make IndexWriter's ReaderPool public just yet?  Maybe instead we can add API to query for whether a segment has pending unflushed deletes?  (And fix core merge policies to use that API when deciding how to expungeDeletes).

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Commented: (LUCENE-1742) Wrap SegmentInfos in public class

Posted by "Jason Rutherglen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12732738#action_12732738 ] 

Jason Rutherglen commented on LUCENE-1742:
------------------------------------------

LogMergePolicy needs to access the pooled reader's num deletes.  I'll add it, remove IW.hasDeletes, and offer IW.numDeletedDocs(SegmentInfo)

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Commented: (LUCENE-1742) Wrap SegmentInfos in public class

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730755#action_12730755 ] 

Michael McCandless commented on LUCENE-1742:
--------------------------------------------

I agree it'd be good to do this, and this baby step (making the read-only methods public) seems like a good start.

Would we want better names here (Segments/Segment), as Earwin suggested a while back?

Can you also mark these classes as Expert and add the "subject to change w/o warning between releases" caveat?

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>         Attachments: LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Jason Rutherglen updated LUCENE-1742:
-------------------------------------

          Component/s: Index
        Fix Version/s: 3.0
             Priority: Trivial  (was: Major)
    Affects Version/s: 2.4.1

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Commented: (LUCENE-1742) Wrap SegmentInfos in public class

Posted by "Jason Rutherglen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-1742?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730640#action_12730640 ] 

Jason Rutherglen commented on LUCENE-1742:
------------------------------------------

In order for this class to be compatible with out current
default LogMergePolicy, we'll need to expose readers from the IW
reader pool. This is because presumably classes may need to
access readers such as in
LogMergePolicy.findMergesToExpungeDeletes.

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Jason Rutherglen updated LUCENE-1742:
-------------------------------------

    Attachment: LUCENE-1742.patch

* Reader pool isn't public anymore

* Left methods of reader as public (could roll back?)

* I'd rather that readerpool be public, however since it's new I
guess we don't want people relying on it?

* All tests pass

* It would be great to get this into 2.9

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Michael McCandless updated LUCENE-1742:
---------------------------------------

    Attachment: LUCENE-1742.patch

Attached patch with tiny changes: made a few more read-only methods public, fixed javadoc warning, one formatting fix, added CHANGES.

I think it's ready to commit.  I'll commit soon...

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Resolved: (LUCENE-1742) Wrap SegmentInfos in public class

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

Michael McCandless resolved LUCENE-1742.
----------------------------------------

    Resolution: Fixed

Thanks Jason!

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 2.9
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Jason Rutherglen updated LUCENE-1742:
-------------------------------------

    Attachment: LUCENE-1742.patch

After looking at it, I wasn't sure why we couldn't simply make
the read only methods in SegmentInfo and SegmentInfos (and the
classes) public. 

Maybe this can make it into 2.9?

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>         Attachments: LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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


[jira] Updated: (LUCENE-1742) Wrap SegmentInfos in public class

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

Jason Rutherglen updated LUCENE-1742:
-------------------------------------

    Attachment: LUCENE-1742.patch

* Added some more javadocs (as suggested). More could be added
to the SegmentInfo and SegmentInfos methods.

* Made SegmentReader public. I think we need to do this as it's
becoming more necessary after LUCENE-1483 where the user may
access individual readers? 

{quote}Would we want better names here (Segments/Segment), as
Earwin suggested a while back?{quote}

Wouldn't this require a bunch of renaming/refactoring? Earwin
what was your suggestion? (couldn't find it)

> Wrap SegmentInfos in public class 
> ----------------------------------
>
>                 Key: LUCENE-1742
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1742
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Index
>    Affects Versions: 2.4.1
>            Reporter: Jason Rutherglen
>            Priority: Trivial
>             Fix For: 3.0
>
>         Attachments: LUCENE-1742.patch, LUCENE-1742.patch
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Wrap SegmentInfos in a public class so that subclasses of MergePolicy do not need to be in the org.apache.lucene.index package.  

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