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

Christine Poerschke updated SOLR-10957:
---------------------------------------
    Attachment: SOLR-10957.patch

Attaching simpler alternative patch, getCore() returning null can be avoided by 
calling getSchema() instead.

----

Background/Context:

How might the 
[SolrCoreParser|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/search/SolrCoreParser.java]
 be used _without_ a SolrCore you might ask?
* SolrCoreParser extends the Lucene 
[CoreParser|https://github.com/apache/lucene-solr/blob/master/lucene/queryparser/src/java/org/apache/lucene/queryparser/xml/CoreParser.java]
 i.e. the core part of the name has nothing to do with solr cores.
* [Flax|http://www.flax.co.uk/]'s 
[Luwak|https://github.com/flaxsearch/luwak/blob/master/README.md] has a 
[MonitorQueryParser|https://github.com/flaxsearch/luwak/blob/master/luwak/src/main/java/uk/co/flax/luwak/MonitorQueryParser.java]
 interface and a 
[LuceneQueryParser|https://github.com/flaxsearch/luwak/blob/master/luwak/src/main/java/uk/co/flax/luwak/queryparsers/LuceneQueryParser.java]
 implementation of that interface.
* If a MonitorQueryParser implementation used the SolrCoreParser then it might 
do so _without_ a SolrCore (but with an IndexSchema and a SolrResourceLoader).


> fix potential NPE in SolrCoreParser.init
> ----------------------------------------
>
>                 Key: SOLR-10957
>                 URL: https://issues.apache.org/jira/browse/SOLR-10957
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Christine Poerschke
>            Assignee: Christine Poerschke
>            Priority: Minor
>         Attachments: SOLR-10957.patch, SOLR-10957.patch
>
>
> [SolrQueryRequestBase|https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/request/SolrQueryRequestBase.java]
>  accommodates requests with a null SolrCore and this small change is for 
> SolrCoreParser.init to do likewise.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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

Reply via email to