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

pwolanin - November 9, 2009 - 21:56
Status:active» needs review
AttachmentSize
update-method-628080-1.patch 1.41 KB

#2

pwolanin - November 14, 2009 - 03:26

Anyone?

We should also think about syncing with the client PHP library before 6.x-1.0 is final.

#3

pwolanin - November 14, 2009 - 03:35

oops - missed a call.

AttachmentSize
update-method-628080-3.patch 1.79 KB

#4

pwolanin - November 15, 2009 - 00:36
Title:Fix method name to match that committed to PHP client» Update PHP client and fix multiple method name to match r22 client
Status:needs review» needs work

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

pwolanin - November 15, 2009 - 06:44
Status:needs work» needs review

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.

AttachmentSize
update-library-628080-5.patch 11.2 KB

#6

pwolanin - November 15, 2009 - 06:50

Also update the README

AttachmentSize
update-library-628080-6.patch 13.38 KB

#7

JacobSingh - November 15, 2009 - 07:03
Status:needs review» reviewed & tested by the community

Barring testing that the new library actually works for the delete by function, this looks good to me.

#8

pwolanin - November 15, 2009 - 15:09
Version:6.x-1.x-dev» 6.x-2.x-dev
Status:reviewed & tested by the community» needs review

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

pwolanin - November 15, 2009 - 16:17

applies pretty clenaly, but need to manually remove the hook_requirements from apachesolr.module - guess it was elsewhere in the file.

AttachmentSize
update-library-628080-9-D6-2.patch 14.15 KB

#10

pwolanin - November 15, 2009 - 16:25
Version:6.x-2.x-dev» 6.x-1.x-dev
Status:needs review» needs work

oh CRAP - CVS messes with the $Revision $ keyword. need a minor fix.

#11

pwolanin - November 15, 2009 - 16:28

Here's a fix.

AttachmentSize
kw-fix-628080-11.patch 1.18 KB

#12

pwolanin - November 15, 2009 - 16:33
Version:6.x-1.x-dev» 6.x-2.x-dev
Status:needs work» needs review

committed that fix, here's a 6.x-2.x version also with that fix.

AttachmentSize
update-library-628080-11-D6-2.patch 14.22 KB

#13

pwolanin - November 15, 2009 - 16:39

fix typo: CLient -> Client

committed directly to 6.x-1.x

AttachmentSize
update-library-628080-12-D6-2.patch 14.25 KB

#14

robertDouglass - November 19, 2009 - 17:34

This still needs to be committed to 6.2 right?

#15

robertDouglass - November 20, 2009 - 11:38

This is the patch I applied to 6.2.

AttachmentSize
phpclient.patch 14.93 KB

#16

robertDouglass - November 20, 2009 - 11:45

The 6.1 branch missed the drush command.

AttachmentSize
drush.patch 895 bytes

#17

robertDouglass - November 20, 2009 - 11:45
Version:6.x-2.x-dev» 5.x-2.x-dev
Status:needs review» patch (to be ported)

#18

robertDouglass - November 20, 2009 - 13:49

Hmm. My patch also didn't have the revision checking fix in it. Applying this to 6.2 as well.

AttachmentSize
revision.patch 1.11 KB

#19

robertDouglass - November 22, 2009 - 13:00

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');

AttachmentSize
comment_search_htmlentities.patch 1.93 KB
 
 

Drupal is a registered trademark of Dries Buytaert.