Mikhail Khludnev created SOLR-9048: -------------------------------------- Summary: {!parent } {!child } throws NPE if underneath query parser yields no clauses Key: SOLR-9048 URL: https://issues.apache.org/jira/browse/SOLR-9048 Project: Solr Issue Type: Bug Components: query parsers Environment: download solr 6.0 distro $bin/solr start -e techproducts
Reporter: Mikhail Khludnev if we add a stopword (here it's {{and}}) we can easily break query parsing via {code} {!child of=inStock:true}{!field f=title_en v='and'}}} {code} {noformat} <str name="trace">java.lang.NullPointerException at org.apache.lucene.search.join.ToChildBlockJoinQuery.hashCode(ToChildBlockJoinQuery.java:360) at org.apache.solr.search.QueryResultKey.<init>(QueryResultKey.java:46) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1521) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:634) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:529) {noformat} {code} q={!parent which=inStock:true}{!field f=title_en v='and'} {code} {noformat} <str name="trace">java.lang.NullPointerException at org.apache.lucene.search.join.ToParentBlockJoinQuery.hashCode(ToParentBlockJoinQuery.java:493) at org.apache.solr.search.QueryResultKey.<init>(QueryResultKey.java:46) at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1521) at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:634) at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:529) at {noformat} however I wonder what's the proper behavior in this cases -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org