|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #72847 Error un-serializing response in SolrQueryResponse->getResponse()
Submitted: 2016-08-16 04:11 UTC Modified: -
From: seifert at alesak dot net Assigned:
Status: Open Package: solr (PECL)
PHP Version: Irrelevant OS: Centos 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: seifert at alesak dot net
New email:
PHP Version: OS:


 [2016-08-16 04:11 UTC] seifert at alesak dot net
Exception is generated When result contain empty doc element.

Response from server is like this: 

<?xml version="1.0" encoding="UTF-8"?>

<result name="response" numFound="167" start="0">
    <int name="ProductCategoryId">18918</int>
    <int name="ProductId">19646</int></doc>
    <int name="ProductCategoryId">18918</int>
    <int name="ProductId">19642</int></doc>
    <int name="ProductCategoryId">18920</int>
    <int name="ProductId">18190</int></doc>

Empty "doc" element is returned by Solr because found document has no field requested by query.

Test script:
$qResponse = $client->query($query);
$response = $qResponse->getResponse(); //here is the error


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC