lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (LUCENE-7875) Rename or move most of MultiFields
Date Fri, 12 Oct 2018 14:00:00 GMT


David Smiley commented on LUCENE-7875:

New patch.  I didn't love having this new MultiLeafReader class after all for just these few
methods that felt ad-hoc (i.e. why just these when maybe should have a bunch more?).  I moved
getMergedFieldInfos and getIndexedFields off to FieldInfos which is a suitable place for them.
 I made MultiBits public and moved getLiveDocs there.  I also removed MultiBits.getMatchingSub
(with SubResult class) which wasn't being used.

Random question that occurred to me: if getMergedFieldInfos is given a LeafReader, shouldn't
we just return it's FieldInfos?

> Rename or move most of MultiFields
> ----------------------------------
>                 Key: LUCENE-7875
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: master (8.0)
>         Attachments: LUCENE-7875.patch, LUCENE-7875.patch, LUCENE-7875.patch, LUCENE-7875.patch
> has a bunch of static methods that provide a single LeafReader's view
over a bunch of things.
> These could perhaps go to ReaderUtil:
> * {{Bits getLiveDocs(IndexReader reader)}}
> * {{FieldInfos getMergedFieldInfos(IndexReader reader)}} (removing "Merged" in its name
which seems inconsistent, or replace with "Multi")
> These could perhaps go to MultiTerms:
> * {{Collection<String> getIndexedFields(IndexReader reader)}}
> * {{Terms getTerms(IndexReader r, String field)}}
> * {{PostingsEnum getTermDocsEnum(IndexReader r, String field, BytesRef term)}}
> Finally, the MultiFields instance itself, implementing {{Fields}} along with the static
utility method {{Fields getFields(IndexReader reader)}} could perhaps remain until we can
finally remove it (or move to a test classpath or something) when there is no more purpose

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message