Github user shebiki commented on the pull request:

    https://github.com/apache/lucene-solr/pull/40#issuecomment-38562659
  
    Mikhail,
    
    Fair enough.
    
    I'd like to suggest two different options and am happy to supply patches.
    
    1) Remove the TODO comment next to Scorer.weight. 
    
    
https://github.com/apache/lucene-solr/blob/branch_4x/lucene/core/src/java/org/apache/lucene/search/Scorer.java#L45
    
    ```java
    public abstract class Scorer extends DocsEnum {
      /** the Scorer's parent Weight. in some cases this may be null */
      // TODO can we clean this up?
      protected final Weight weight;
    ```
    
    2) More controversial, replaced this weight with a query reference. This 
would help decouple Scorers from Weights and should allow for more Scorer reuse.
    
    What do you think?
    
    --Terry



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to