Understood, but do ALL Solr service calls allow you to specify the
format?
I thought the wt parameter was a select / search only feature, which
is why I implemented xml (to deal with anything I couldn't specify)
AND json (because this was the fastest to parse from 1.2 on search).
Every function of the client except for ping returns a Solr_Response
object. Typically you might not read anything from this response
when its not a search operation, but you could if you wanted.
If all calls can have the response format specified then I'm all for
simplification. Especially if serialized or eval'able PHP responses
are faster or as fast as decoding JSON. Not only would it simply the
client but it would also relax the PHP version requirements
(json_decode and XmlReader are the driving factors).
- Donovan
On Aug 18, 2007, at 10:06 PM, Yonik Seeley wrote:
On 8/17/07, Donovan Jimenez <[EMAIL PROTECTED]> wrote:
In regards to 1.3 PHP based response writers:
I did see this and included two response interpreters for these in my
source (though I wasn't developing against Solr 1.3 so they are more
stubs than useable). The Solr_Response follows a factory pattern and
automatically chooses the correct Response subclass based on the
Content-Type of the HTTP response header. Each subclass then tries to
provide the same method of access to the different parts of the
response. Both JSON and XML are fully implemented (I found
interpretting JSON search responses was fastest for search responses
- not to mention the slightly smaller data size)
Solr has multiple response formats so the client can pick the most
convenient.
There's increased maintenance associated with accepting multiple on
the client side.
-Yonik