php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71591 SolrQueryResponse::getRequestUrl returns wrong url with terms
Submitted: 2016-02-14 21:33 UTC Modified: -
From: omars@php.net Assigned:
Status: Closed Package: solr (PECL)
PHP Version: Irrelevant OS: *
Private report: No CVE-ID: None
 [2016-02-14 21:33 UTC] omars@php.net
Description:
------------
SolrResponse::getRequestUrl() returns select url when terms url was used

Test script:
---------------
<?php

require_once "bootstrap.inc";

$options = array
(
    'hostname' => SOLR_SERVER_HOSTNAME,
    'login'    => SOLR_SERVER_USERNAME,
    'password' => SOLR_SERVER_PASSWORD,
    'port'     => SOLR_SERVER_PORT,
    'path'	   => SOLR_SERVER_PATH,
);


$client = new SolrClient($options);

$query = new SolrQuery('*:*');

$query->setTerms(true);

$query->setTermsField('name');

$query->setTermsLowerBound('a');

$query->setTermsUpperBound('motor');

$query->setTermsIncludeLowerBound(true);

$query->setTermsIncludeUpperBound(true);

$query->setTermsMinCount(50);

$query->setTermsMaxCount(200);

$query->setTermsPrefix('A');

$query->setTermsLimit(45);

$query->setTermsReturnRaw(false);

$query->setTermsSort(SolrQuery::TERMS_SORT_INDEX);

$query_response = $client->query($query);

echo $query_response->getRequestUrl() .PHP_EOL;

Expected result:
----------------
http://%s/solr/collection1/terms/?version=2.2&indent=on&wt=xml

Actual result:
--------------
http://%s/solr/collection1/select/?version=2.2&indent=on&wt=xml

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-02-14 23:15 UTC] omars@php.net
Automatic comment on behalf of omars
Revision: http://git.php.net/?p=pecl/search_engine/solr.git;a=commit;h=c2e47138551e9c29edeb339447a1f4160ca077be
Log: Fix Bug #71591: SolrQueryResponse::getRequestUrl returns wrong url with terms
 [2016-02-14 23:15 UTC] omars@php.net
-Status: Open +Status: Closed
 
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue May 24 22:03:51 2022 UTC