lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9275) make XML Query Parser support extensible-via-configuration
Date Mon, 18 Jul 2016 22:04:20 GMT

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

Hoss Man commented on SOLR-9275:
--------------------------------

[~cpoerschke]: suspiciously timed NPEs in xml parser related tests on master...

http://jenkins.thetaphi.de/job/Lucene-Solr-master-Solaris/725/
{noformat}
FAILED:  org.apache.solr.search.QueryEqualityTest.testMatchAllDocsQueryXmlParser

Error Message:

Stack Trace:
java.lang.NullPointerException
        at __randomizedtesting.SeedInfo.seed([906E24691016A761:855CC3EB430065FB]:0)
        at org.apache.solr.search.SolrCoreParser.init(SolrCoreParser.java:54)
        at org.apache.solr.search.XmlQParserPlugin$XmlQParser.parse(XmlQParserPlugin.java:60)
        at org.apache.solr.search.QParser.getQuery(QParser.java:140)
        at org.apache.solr.search.QueryEqualityTest.assertQueryEquals(QueryEqualityTest.java:1013)
        at org.apache.solr.search.QueryEqualityTest.assertQueryEquals(QueryEqualityTest.java:987)
        at org.apache.solr.search.QueryEqualityTest.testMatchAllDocsQueryXmlParser(QueryEqualityTest.java:204)
{noformat}

A seed i just encountered locally...

{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=QueryEqualityTest -Dtests.method=testMatchAllDocsQueryXmlParser
-Dtests.seed=8C6EA92C29E18E82 -Dtests.slow=true -Dtests.locale=lt -Dtests.timezone=Australia/Lindeman
-Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1
   [junit4] ERROR   0.04s J1 | QueryEqualityTest.testMatchAllDocsQueryXmlParser <<<
   [junit4]    > Throwable #1: java.lang.NullPointerException
   [junit4]    > 	at __randomizedtesting.SeedInfo.seed([8C6EA92C29E18E82:995C4EAE7AF74C18]:0)
   [junit4]    > 	at org.apache.solr.search.SolrCoreParser.init(SolrCoreParser.java:54)
   [junit4]    > 	at org.apache.solr.search.XmlQParserPlugin$XmlQParser.parse(XmlQParserPlugin.java:60)
   [junit4]    > 	at org.apache.solr.search.QParser.getQuery(QParser.java:140)
   [junit4]    > 	at org.apache.solr.search.QueryEqualityTest.assertQueryEquals(QueryEqualityTest.java:1013)
   [junit4]    > 	at org.apache.solr.search.QueryEqualityTest.assertQueryEquals(QueryEqualityTest.java:987)
   [junit4]    > 	at org.apache.solr.search.QueryEqualityTest.testMatchAllDocsQueryXmlParser(QueryEqualityTest.java:204)
   [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
{noformat}


> make XML Query Parser support extensible-via-configuration
> ----------------------------------------------------------
>
>                 Key: SOLR-9275
>                 URL: https://issues.apache.org/jira/browse/SOLR-9275
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Christine Poerschke
>            Assignee: Christine Poerschke
>            Priority: Minor
>         Attachments: SOLR-9275.patch
>
>
> SOLR-839 added XML QueryParser support (deftype=xmlparser) and this ticket here proposes
to make that support extensible-via-configuration.
> Objective:
>  * To support use of custom query builders.
>  * To support use of custom query builders _without_ a corresponding custom XmlQParser
plugin class.
> Illustration:
>  * solrconfig.xml snippet to configure use of the custom builders
> {code}
> <queryParser name="testxmlparser" class="XmlQParserPlugin">
>   <str name="HelloQuery">org.apache.solr.search.HelloQueryBuilder</str>
>   <str name="GoodbyeQuery">org.apache.solr.search.GoodbyeQueryBuilder</str>
> </queryParser>
> {code}
> * HelloQueryBuilder and GoodbyeQueryBuilder both extend the new abstract SolrQueryBuilder
class.
> {code}
> + public abstract class SolrQueryBuilder implements QueryBuilder {
> +   protected final SolrQueryRequest req;
> +   protected final QueryBuilder queryFactory;
> +   public SolrQueryBuilder(String defaultField, Analyzer analyzer,
> +       SolrQueryRequest req, QueryBuilder queryFactory) {
> +     this.req = req;
> +     this.queryFactory = queryFactory;
> +   }
> + }
> {code}



--
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