lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-7875) Rename or move most of MultiFields
Date Mon, 01 Oct 2018 15:55:00 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-7875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

David Smiley updated LUCENE-7875:
---------------------------------
         Priority: Minor  (was: Major)
    Fix Version/s: master (8.0)

Here's the patch.  It's pretty big because there are many callers, most are in test methods.
* New MultiLeafReader (static utility class) now has getLiveDocs, getMergedFieldInfos, and
getIndexedFields.
* MultiTerms now has getTerms, getTermDocsEnum, getTermPositionsEnum

[~romseygeek] Perhaps we can consider removing and/or renaming getTermDocsEnum and getTermPositionsEnum
which are basically the same thing.  I recall you were involved in some related refactorings.
 It could be in a separate issue or this one.

In a separate issue, I'll be able to move MultiFields with MappedMultiFields into the o.a.l.codecs
package and make package-private.  If the two together were in the codecs package, they could
be hidden.

An alternative to introducing MultiLeafReader would be to move getMergedFieldInfos & getIndexedFields
(maybe changing that latter one a bit to be more generic with a predicate), and then move
getLiveDocs to MultiBits but would need to make it public.  Shrug; I have no strong opinion.

> Rename or move most of MultiFields
> ----------------------------------
>
>                 Key: LUCENE-7875
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7875
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: master (8.0)
>
>         Attachments: LUCENE-7875.patch
>
>
> MultiFields.java 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
for Fields.java.



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


Mime
View raw message