lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] [Commented] (SOLR-8475) Some refactoring to SolrIndexSearcher
Date Sat, 02 Jan 2016 20:48:40 GMT


Yonik Seeley commented on SOLR-8475:

bq. LOG is a static final field and I try to follow that convention with any static-final

IMO, it's more about if the object is a constant, not if the reference is final, and loggers
aren't effectively immutable.

Current frequency in the code base suggests that lowercase is our current default.
/opt/code/lusolr$ find . -name \*.java | xargs grep "Logger LOG"  | wc
      78     624   14141
/opt/code/lusolr$ find . -name \*.java | xargs grep "Logger log"  | wc
     421    3315   71490

If we want to refactor and change all of one to the other, it seems like there should be another
JIRA issue and consensus around the issue.

> Back compat breaks
True, but it's a really simple one to address
If it requires recompilation, it's not back compat though.

> Some refactoring to SolrIndexSearcher
> -------------------------------------
>                 Key: SOLR-8475
>                 URL:
>             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

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

View raw message