Update PHP client and fix multiple method name to match r22 client
pwolanin - November 9, 2009 - 21:55
| Project: | Apache Solr Search Integration |
| Version: | 5.x-2.x-dev |
| Component: | SolrPHP Client |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Description
For 1.0 we should try to sync the PHP client library so we can use the current rev.
In this issue, the library maintainer decided to use the method name deleteByMultipleIds() rather than what I suggested and put in the Drupal class, deleteMultipleById()
http://code.google.com/p/solr-php-client/issues/detail?id=21
We shoudl probably change our method name to match so that we can simply drop in the updated library and remove the method from the Drupal class.

#1
#2
Anyone?
We should also think about syncing with the client PHP library before 6.x-1.0 is final.
#3
oops - missed a call.
#4
Actually, Donovan made a new tarball available of r22: http://solr-php-client.googlecode.com/files/SolrPhpClient.r22.2009-11-09...
listed at http://code.google.com/p/solr-php-client/downloads/list
that includes this new multiple method (in r20). This version of the client also exposes it's svn revision, so we can potentially start using hook_requirements to make sure the library is present AND that it has the right version.
Apache_Solr_Service::SVN_REVISION is '$Revision: 22 $'
So - I propose we try to update to this r22 client, since that way we can also point end-users to the tarball download rather than forcing them to get it from svn.
#5
Ah, beating my head on a wall for a bit. It turns out that the hook_requirements implementation MUST be in the .install file for it to be checked when installing the module.
apachesolr_strip_ctl_chars() can be removed now since the final xml document is filtered using our regex thanks to an upstream fix.
#6
Also update the README
#7
Barring testing that the new library actually works for the delete by function, this looks good to me.
#8
We can test that - generally I kill Solr and delete a few nodes frmo the admin interface. I tested the 1st patch this way with the simple rename, and the code in the PHp library looks right, so it shoudl be easy enough to re-confirm before rolling a release.
committed this patch to 6.x-1.x, let's see if it applies to 6.x-2.x...
#9
applies pretty clenaly, but need to manually remove the hook_requirements from apachesolr.module - guess it was elsewhere in the file.
#10
oh CRAP - CVS messes with the $Revision $ keyword. need a minor fix.
#11
Here's a fix.
#12
committed that fix, here's a 6.x-2.x version also with that fix.
#13
fix typo: CLient -> Client
committed directly to 6.x-1.x
#14
This still needs to be committed to 6.2 right?
#15
This is the patch I applied to 6.2.
#16
The 6.1 branch missed the drush command.
#17
#18
Hmm. My patch also didn't have the revision checking fix in it. Applying this to 6.2 as well.
#19
Comment search module in DRUPAL-6--2 has two instances of return htmlspecialchars(html_entity_decode($text, ENT_NOQUOTES, 'UTF-8'), ENT_NOQUOTES, 'UTF-8');