lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-8475) Some refactoring to SolrIndexSearcher
Date Sat, 02 Jan 2016 19:19:39 GMT

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

Yonik Seeley commented on SOLR-8475:
------------------------------------

bq. I think that static fields should be uppercase. 

That's not our convention (or even common in my experience)... it's usually only constants
(i.e. static final strings/ints/empty_maps) that get uppercase treatment.
changing "log" to "LOG" everywhere (or all statics to uppercase) definitely deserves to get
it's own JIRA issue and consensus if we want to change that.

bq. No, I intend to commit it to 5x too, as I've noted in the "Fix Versions". Why would it
be trunk only?

Back compat breaks... things like QueryCommand are higher-level and more likely to be used
by custom code / plugins.

bq. I agree about the re-wrapped lines. I found it annoying too. But again, I thought this
is just the standard of our formatting rules.

I don't think we ever had / agreed to coding standards to that level of detail.  Some things
just fall into the realm of personal preference.  Once something is committed I just tend
to leave the formatting alone unless I'm actively editing that part of the code, or if it's
really bad.


> Some refactoring to SolrIndexSearcher
> -------------------------------------
>
>                 Key: SOLR-8475
>                 URL: https://issues.apache.org/jira/browse/SOLR-8475
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>            Reporter: Shai Erera
>            Assignee: Shai Erera
>            Priority: Minor
>             Fix For: 5.5, Trunk
>
>         Attachments: SOLR-8475.patch, SOLR-8475.patch, SOLR-8475.patch, SOLR-8475.patch
>
>
> While reviewing {{SolrIndexSearcher}}, I started to correct a thing here and there, and
eventually it led to these changes:
> * Moving {{QueryCommand}} and {{QueryResult}} to their own classes.
> * Moving FilterImpl into a private static class (was package-private and defined in the
same .java file, but separate class).
> * Some code formatting, imports organizing and minor log changes.
> * Removed fieldNames (handled the TODO in the code)
> * Got rid of usage of deprecated classes such as {{LegacyNumericUtils}} and {{Legacy-*-Field}}.
> I wish we'd cut down the size of this file much more (it's 2500 lines now), but I've
decided to stop here so that the patch is manageable. I would like to explore further refactorings
afterwards, e.g. extracting cache management code to an outer class (but keep {{SolrIndexSearcher}}'s
API the same, if possible).
> If you have additional ideas of more cleanups / simplifications, I'd be glad to do them.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message