You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Adrien Grand (JIRA)" <ji...@apache.org> on 2018/09/20 07:57:00 UTC

[jira] [Commented] (LUCENE-8511) MultiFields.getIndexedFields can be optimized to not use getMergedFieldInfos

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

Adrien Grand commented on LUCENE-8511:
--------------------------------------

Out of curiosity, have you found it to be a bottleneck for something? No objections to the change but if we are going with streams, could we make them easier to read by putting each new operation on the stream on a new line (and maybe moving the filtering to the outer stream)?

> MultiFields.getIndexedFields can be optimized to not use getMergedFieldInfos
> ----------------------------------------------------------------------------
>
>                 Key: LUCENE-8511
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8511
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-8511.patch
>
>
> MultiFields.getIndexedFields calls getMergedFieldInfos.  But getMergedFieldInfos is kinda heavy, doing all sorts of stuff that getIndexedFields doesn't care about.  It can simply loop the leaf readers and collect the results into a Set.  Java 8 streams should make easy work of this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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