panjiwa10028 / solr-php-client

Automatically exported from code.google.com/p/solr-php-client
Other
0 stars 0 forks source link

version parameter only relevant for XMl response writer #23

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

This is minor, but in Service.php the version is always added to the query
string in public function search():

        $params['version'] = self::SOLR_VERSION;

There are 2 problems with this.  Frist, as best I can tell from the Solr
documentation and the source code of the JSON response writer, the version
parameter is not used by the JSON writer at all.  It only seems to be used
by the XML writer:

http://wiki.apache.org/solr/XMLResponseFormat#version

That page also list valid versions as 2.0, 2.1, and 2.2 (though the source
code for that writer actually just treats anything < 2.1 the same).

but Service.php defines:  

    /**
     * Response version we support
     */
    const SOLR_VERSION = '1.2';

It seems like this 'version' param can be simply removed, or at least
omitted if the request writer type is not 'xml'.

Original issue reported on code.google.com by pwola...@gmail.com on 15 Nov 2009 at 1:30

GoogleCodeExporter commented 8 years ago
Fixed in r24

Original comment by donovan....@gmail.com on 21 Nov 2009 at 2:07