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

Yonik Seeley commented on LUCENE-5690:
--------------------------------------

bq. I don't see this in the code of MultiTermsEnum.
see MultiTermsEnum .getMatchArray()

bq. This patch is fine if you make the methods return List<Terms> and 
List<ReaderSlice>
Like the other methods, MultiTermsEnum .getMatchArray() and 
MultiDocsEnum.getSubs, we shouldn't add additional overhead of object creation 
just to inspect an object.  These are expert level APIs that are not on the 
base class (hence will never be used casually).

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

Sometimes better efficiency, sometimes more information.  One example for this 
specific addition is that MultiTerms.size() always returns -1.  If we look at 
the sub-terms we can at least see what the number of terms for each segment is.

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to