[ 
https://issues.apache.org/jira/browse/SOLR-10836?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Smiley reassigned SOLR-10836:
-----------------------------------

         Assignee: David Smiley
    Fix Version/s: 6.7
                   master (7.0)
      Description: 
TextLogisticRegressionQParserPlugin, IGainTermsQParserPlugin and 
SignificantTermsQParserPlugin are similarly affected:

finish() contains this line of code:
{code:java}
Terms terms = 
MultiFields.getFields(searcher.getIndexReader()).terms(trainingParams.feature);
{code}
Instead I think it should be this:
{code:java}
Terms terms = 
((SolrIndexSearcher)searcher).getSlowAtomicReader().terms(trainingParams.feature);
{code}

MultiFields can take some time to build and Solr (via SlowAtomicReader) has 
already done this work.

In addition, the code assumes Terms is non-null when in fact it will be null if 
there's no data.

  was:
org.apache.solr.search.TextLogisticRegressionQParserPlugin.TextLogisticRegressionCollector#finish
 contains this line of code:
{code:java}
Terms terms = 
MultiFields.getFields(searcher.getIndexReader()).terms(trainingParams.feature);
{code}
Instead I think it should be this:
{code:java}
Terms terms = 
((SolrIndexSearcher)searcher).getSlowAtomicReader().terms(trainingParams.feature);
{code}

MultiFields can take some time to build and Solr (via SlowAtomicReader) has 
already done this work.

       Issue Type: Bug  (was: Improvement)
          Summary: TextLogisticRegression parser (and others) assume non-empty 
index.  (was: TextLogisticRegressionQParserPlugin needn't call MultiFields; use 
SolrIndexSearcher's cached instance)

> TextLogisticRegression parser (and others) assume non-empty index.
> ------------------------------------------------------------------
>
>                 Key: SOLR-10836
>                 URL: https://issues.apache.org/jira/browse/SOLR-10836
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: David Smiley
>            Assignee: David Smiley
>            Priority: Minor
>             Fix For: master (7.0), 6.7
>
>         Attachments: SOLR-10836.patch, 
> SOLR_10836_use_SolrIndexSearcher_cached_MultiFields_instead_of_recreating.patch
>
>
> TextLogisticRegressionQParserPlugin, IGainTermsQParserPlugin and 
> SignificantTermsQParserPlugin are similarly affected:
> finish() contains this line of code:
> {code:java}
> Terms terms = 
> MultiFields.getFields(searcher.getIndexReader()).terms(trainingParams.feature);
> {code}
> Instead I think it should be this:
> {code:java}
> Terms terms = 
> ((SolrIndexSearcher)searcher).getSlowAtomicReader().terms(trainingParams.feature);
> {code}
> MultiFields can take some time to build and Solr (via SlowAtomicReader) has 
> already done this work.
> In addition, the code assumes Terms is non-null when in fact it will be null 
> if there's no data.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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

Reply via email to