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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
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

Add a Patch

Pull Requests

Add a Pull Request

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: Fri Mar 29 09:01:28 2024 UTC