Add method to allow requests to additional Solr servelets (paths)

pwolanin - October 22, 2009 - 19:18
Project:Apache Solr Search Integration
Version:5.x-2.x-dev
Component:Code
Category:task
Priority:critical
Assigned:Unassigned
Status:closed
Description

For the attachements module and other added functionality it would be nice to add the facility to easily post (and request?) data to different paths in addition to the ones defined in the classes.

#1

pwolanin - October 22, 2009 - 19:21
Status:active» needs review

Something like this - would be useful for the attachements module to POST multi-part form data

AttachmentSize
servlet-post-612024-1.patch 1.66 KB

#2

pwolanin - October 25, 2009 - 18:02
Priority:normal» critical

Slightly revised - needed for: http://drupal.org/node/490078

AttachmentSize
servlet-post-612024-2.patch 2.4 KB

#3

JacobSingh - October 25, 2009 - 18:24

+++ apachesolr.module 25 Oct 2009 18:01:11 -0000
@@ -1041,6 +1041,10 @@ function apachesolr_facetcount_save($edi
+  if (empty($query)) {
+    // This should only happen if Solr is not set up - avoids fatal errors.
+    return;
+  }

Sneaking something in? Well, I suppose it's a good idea.

Regarding the function, it's okay with me, but smells like cut-and-paste. Perhaps the available handlers should be defined in an array or something so they can be modified through some public method?

Anyway, if it's a pain to refactor, it's not a very difficult thing to fix later.

-J

I'm on crack. Are you, too?

#4

pwolanin - October 25, 2009 - 20:47

The method we took already to add additional handlers was to extend the class from the PHP library via the Drupal module and add new methods. It just won't work to have each additional contrib module try to do that, so this can be a more generic approch for module to interact with customized response handlers. We should probably add a matching GET method?

#5

pwolanin - October 25, 2009 - 21:33

Here's a little more refined method that allows any type of request.

AttachmentSize
servlet-request-612024-5.patch 3.17 KB

#6

pwolanin - October 26, 2009 - 02:02

Final version w/ tweaked doxygen

committing this to 6.x-1.x

AttachmentSize
servlet-request-612024-6.patch 3.1 KB

#7

pwolanin - October 26, 2009 - 02:11
Title:Expose function to allow posting to additional Solr paths» Add method to allow requests to additional Solr servelets (paths)

committing attached to 6.x-2.x

AttachmentSize
servlet-request-612024-7-6x-2x.patch 3.98 KB

#8

pwolanin - October 26, 2009 - 02:31
Version:6.x-1.x-dev» 5.x-2.x-dev
Status:needs review» patch (to be ported)

port to 5.x?

#9

claudiu.cristea - November 5, 2009 - 17:05
Status:patch (to be ported)» needs review

Yes. Here's the patch...

#10

claudiu.cristea - November 5, 2009 - 17:07

Uppps... Sorry, forgot the patch.

AttachmentSize
apachesolr-612024-D5.patch 3.98 KB

#11

claudiu.cristea - November 5, 2009 - 17:30
Status:needs review» fixed

Committed in #284512.

#12

System Message - November 19, 2009 - 17:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.