Grokbase Groups Lucene dev July 2010
FAQ
NullPointerException for more like this request handler via SolrJ if the document does not exist
------------------------------------------------------------------------------------------------

Key: SOLR-2005
URL: https://issues.apache.org/jira/browse/SOLR-2005
Project: Solr
Issue Type: Bug
Components: clients - java, MoreLikeThis
Affects Versions: 1.4
Environment: jdk1.6
Reporter: Peter Karich


If I query solr with the following (via SolrJ):

q=myUniqueKey%3AsomeValueWhichDoesNotExist&qt=%2Fmlt&mlt.fl=myMLTField&mlt.minwl=2&mlt.mindf=1&mlt.match.include=false&facet=true&facet.sort=count&facet.mincount=1&facet.limit=10&facet.field=differentFacetField&start=0&rows=10

I get:

org.apache.solr.client.solrj.SolrServerException: Error executing query
at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
Caused by: java.lang.NullPointerException
at org.apache.solr.client.solrj.response.QueryResponse.extractFacetInfo(QueryResponse.java:180)
at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:103)
at org.apache.solr.client.solrj.response.QueryResponse.(QueryRequest.java:89)

The xml response of the url is empty and so the info variable at line

NamedList<Integer> fq = (NamedList<Integer>) info.get( "facet_queries" );

(QueryResponse) is null. Maybe all variables at QueryResponse.setResponse should be checked against null? Sth. like

val = res.getVal( i );
if(val == null) continue;

?

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Search Discussions

  • Peter Karich (JIRA) at Jul 19, 2010 at 7:52 pm
    [ https://issues.apache.org/jira/browse/SOLR-2005?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Peter Karich updated SOLR-2005:
    -------------------------------

    Priority: Minor (was: Major)
    NullPointerException for more like this request handler via SolrJ if the document does not exist
    ------------------------------------------------------------------------------------------------

    Key: SOLR-2005
    URL: https://issues.apache.org/jira/browse/SOLR-2005
    Project: Solr
    Issue Type: Bug
    Components: clients - java, MoreLikeThis
    Affects Versions: 1.4
    Environment: jdk1.6
    Reporter: Peter Karich
    Priority: Minor
    Original Estimate: 0.33h
    Remaining Estimate: 0.33h

    If I query solr with the following (via SolrJ):
    q=myUniqueKey%3AsomeValueWhichDoesNotExist&qt=%2Fmlt&mlt.fl=myMLTField&mlt.minwl=2&mlt.mindf=1&mlt.match.include=false&facet=true&facet.sort=count&facet.mincount=1&facet.limit=10&facet.field=differentFacetField&start=0&rows=10
    I get:
    org.apache.solr.client.solrj.SolrServerException: Error executing query
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:95)
    at org.apache.solr.client.solrj.SolrServer.query(SolrServer.java:118)
    Caused by: java.lang.NullPointerException
    at org.apache.solr.client.solrj.response.QueryResponse.extractFacetInfo(QueryResponse.java:180)
    at org.apache.solr.client.solrj.response.QueryResponse.setResponse(QueryResponse.java:103)
    at org.apache.solr.client.solrj.response.QueryResponse.<init>(QueryResponse.java:80)
    at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
    The xml response of the url is empty and so the info variable at line
    NamedList<Integer> fq = (NamedList<Integer>) info.get( "facet_queries" );
    (QueryResponse) is null. Maybe all variables at QueryResponse.setResponse should be checked against null? Sth. like
    val = res.getVal( i );
    if(val == null) continue;
    ?
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.


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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieslucene
postedJul 19, '10 at 7:52p
activeJul 19, '10 at 7:52p
posts2
users1
websitelucene.apache.org

1 user in discussion

Peter Karich (JIRA): 2 posts

People

Translate

site design / logo © 2021 Grokbase