lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Gove (JIRA)" <>
Subject [jira] [Created] (SOLR-9171) Umbrella ticket for refactoring* classes
Date Sun, 29 May 2016 15:55:13 GMT
Dennis Gove created SOLR-9171:

             Summary: Umbrella ticket for refactoring* classes
                 Key: SOLR-9171
             Project: Solr
          Issue Type: Task
          Components: SolrJ
            Reporter: Dennis Gove

The Streaming API is gaining more and more features and i believe there are a few places where
we can cleanup the core codebase to improve the code of those new features. While the Streaming
API is still listed experimental I'd like to take the opportunity to make these changes. 

This ticket is intended to act as a umbrella for the various patches I'd like to apply. Due
to the core nature within of the classes I'd like to change each patch may touch
quite a few classes but a goal will be to limit each patch to a singular type of change. 

A few of the changes I have in mind:
1. Refactor/rename some methods in stream.expr.StreamFactory to make them easier to understand
and work with. Also add documentation to the public functions. This includes a changing of
some function signatures.

2. Rename the package io.comp to io.sort because while the classes in here use Java's Comparator
interface they are really just sorters. Also rename classes to indicate sorting. (I'm not
 married to this idea but I think the name change would be beneficial)

3. Collapse the MultipleFieldComparator and FieldComparator into a single class that can handle
both single and multiple field sorting. There are places where we have to check which kind
of comparator something is and I think this can be simplified into a single class handling
both types.

4. Per a comment in io.eq.Equalitor, Java 8 has an interface called BiPredicate which can
fully replace the Equalitor interface. Given that we're now fully on Java 8 I believe we can
get rid of the Equalitor interface in favor of BiPredicate.

5. Collapse FieldEqualitor and MultipleFieldEqualitor into a single class (same reasoning
as with the Sorters).

6. Remove the need for a special StreamExpressionNamedParameter class. A parameter could just
have a name - we don't need a special class for that concept.

I'm open for discussion on any and all of these suggested changes. The only one that I feel
is *critically* important is the the first one, Refactor/rename some methods in stream.expr.StreamFactory,
but if we're gonna go down this path I think this would be a good time to make the other changes
as well.

[~joel.bernstein], [~risdenk], [~caomanhdat], I'm interested in your thoughts on this.

This message was sent by Atlassian JIRA

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

View raw message