php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #66774 SolrQuery::setFacetDateGap produces an error
Submitted: 2014-02-25 23:06 UTC Modified: 2014-02-27 01:03 UTC
From: omars@php.net Assigned: omars (profile)
Status: Not a bug Package: solr (PECL)
PHP Version: Irrelevant OS: All
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: omars@php.net
New email:
PHP Version: OS:

 

 [2014-02-25 23:06 UTC] omars@php.net
Description:
------------
When running 

SolrQuery::setFacetDateGap('+1YEAR');

No results are shown since solr produces an error due to url encoding not present:
Solr Server Error: date facet 'gap' is not a valid Date Math string:  1YEAR

Test script:
---------------
$query = new SolrQuery();
$query->setFacetDateGap('+1YEAR');

echo $query;

Expected result:
----------------
facet.date.gap=%2B1YEAR

Actual result:
--------------
facet.date.gap=+1YEAR

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-26 01:18 UTC] omars@php.net
Automatic comment on behalf of omars
Revision: http://git.php.net/?p=pecl/search_engine/solr.git;a=commit;h=7e0961444ac1ddf59bf12058e8f9e7837981717c
Log: Fixed Bug #66774, SolrQuery::setFacetDateGap() parameter not URL encoded
 [2014-02-26 01:18 UTC] omars@php.net
-Status: Open +Status: Closed
 [2014-02-26 19:27 UTC] omars@php.net
Automatic comment on behalf of omars
Revision: http://git.php.net/?p=pecl/search_engine/solr.git;a=commit;h=82e65e54a8476bd83fbbaa32357ebbde08d2f016
Log: Revert "Fixed Bug #66774, SolrQuery::setFacetDateGap() parameter not URL encoded"
 [2014-02-27 01:03 UTC] omars@php.net
-Status: Closed +Status: Not a bug -Assigned To: +Assigned To: omars
 [2014-02-27 01:03 UTC] omars@php.net
parameters are encoded on query time
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 12:01:31 2024 UTC