lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (LUCENE-8513) Remove MultiFields.getFields and minimize use of MultiFields instance
Date Mon, 24 Sep 2018 03:43:00 GMT


David Smiley commented on LUCENE-8513:

The result of this patch is that the sole usage remaining is {{org.apache.lucene.codecs.FieldsConsumer#merge}}.
I didn't move this class to that package and weaken the visibility because there presently
are a bunch of static methods still here but soon there won't be via LUCENE-7875. That one
should have happened first but I got interested in this one this weekend.  It doesn't matter.
 * Removed static getFields and an inner class related to that.
 * Updated various tests accordingly – where most changes were. It'd be nice if getIndexedFields
were sorted order but wasn't hard to get around.
 * SlowCompositeReaderWrapper (now in Solr) is the primary non-test user. It was straight-forward
to update using MultiFields.getTerms.
 * Fixed bug in MultiFields.getTerms that created a ReaderSlice with a readerIndex one smaller
than it should have been. This was my bug. Apparently there has been no consumer of this bit
of metadata to date that also got it via MultiFields.getTerms or else the bug would have been
identified already. When I made SlowCompositeReaderWrapper switch to use getTerms, it uncovered
a bug elsewhere in Solr using this class related to faceting which examined it.

> Remove MultiFields.getFields and minimize use of MultiFields instance
> ---------------------------------------------------------------------
>                 Key: LUCENE-8513
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Major
>             Fix For: master (8.0)
>         Attachments: LUCENE-8513.patch
> As part of a longer term objective of removing the {{Fields}} class, in this issue I
focus on minimizing the use of _instances of_ {{MultiFields}} such as {{MultiFields.getFields}}
and using it's constructor.  This is _not_ about the static utility methods here like {{getTerms}}.

This message was sent by Atlassian JIRA

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

View raw message