php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68181 Conflict Occurs When using SolrDisMax::addBoostQuery and setBoostQuery
Submitted: 2014-10-08 01:00 UTC Modified: 2014-10-08 01:01 UTC
From: omars@php.net Assigned: omars (profile)
Status: Closed Package: solr (PECL)
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
 [2014-10-08 01:00 UTC] omars@php.net
Description:
------------
Memory leaks occur when mixing parameter types due to the use of both methods on the same object.

A notice shall be produced and the values should get overriden, older parameter shall be removed

Test script:
---------------
$dismaxQuery = new SolrDisMaxQuery("lucene");
$dismaxQuery->setBoostQuery("failing:val^3")
->addBoostQuery('category','software',2)
->setBoostQuery("end:result^4");

echo $dismaxQuery.PHP_EOL;

Expected result:
----------------
Notice: SolrDisMaxQuery::addBoostQuery(): Parameter bq value(s) was overwritten by this call in test.php on line 3

Notice: SolrDisMaxQuery::setBoostQuery(): Parameter bq value(s) was overwritten by this call in test.php on line 4
q=lucene&defType=dismax&bq=end:result^4


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-08 01:01 UTC] omars@php.net
-Assigned To: +Assigned To: omars
 [2014-10-08 01:12 UTC] omars@php.net
Automatic comment on behalf of omars
Revision: http://git.php.net/?p=pecl/search_engine/solr.git;a=commit;h=a1faee8ffa40a862cd2c7a38d5277899c9bfc96a
Log: Fix Bug #68181: Memory leaks/unexpected behavior with SolrDisMax::addBoostQuery and setBoostQuery
 [2014-10-08 01:12 UTC] omars@php.net
-Status: Assigned +Status: Closed
 [2014-11-09 22: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=a1faee8ffa40a862cd2c7a38d5277899c9bfc96a
Log: Fix Bug #68181: Memory leaks/unexpected behavior with SolrDisMax::addBoostQuery and setBoostQuery
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 14:03:34 2021 UTC