You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Uwe Schindler (JIRA)" <ji...@apache.org> on 2014/05/20 20:40:38 UTC

[jira] [Commented] (LUCENE-5690) expose sub-Terms from MultiTerms

    [ https://issues.apache.org/jira/browse/LUCENE-5690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14003803#comment-14003803 ] 

Uwe Schindler commented on LUCENE-5690:
---------------------------------------

bq. MultiTermsEnum and MultiDocsEnum both expose their subs

I don't see this in the code of MultiTermsEnum. Both have the arrays private and MultiTermsEnum has no getter (at least in trunk). MultiDocsEnum has a getter (not sure why). In MultiTermsEnum there is one public getter, but this one returns a package private class, so unuseable to the user (this is a bug) - should be removed.

This patch is fine if you make the methods return List<Terms> and List<ReaderSlice>, both with {{Collections.unmodifiableList(Arrays.asList(...))}}. But ReaderSlice is also a more or less "private" class (its just public for cross-package access).

What's the reason to have those public at all?

> expose sub-Terms from MultiTerms
> --------------------------------
>
>                 Key: LUCENE-5690
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5690
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Yonik Seeley
>         Attachments: LUCENE-5690.patch
>
>
> MultiTermsEnum and MultiDocsEnum both expose their subs.  It would be useful to do the same for MultiTerms.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org