Allow Apache Solr to be the default, let search module index 0 nodes per cron run

moshe weitzman - March 17, 2009 - 19:41
Project:Apache Solr Search Integration
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

IMO, the dependency on search module gets in the way. For one, search.module always indexes nodes and can't disabled without hacking.

I know about coresearches module which is a nice way of saying - hack core. Core search is not worth hacking - I prefer it disabled.

#1

JacobSingh - March 18, 2009 - 01:09

I think we have an issue for this already, but I don't see it.

@pwolanin: Do you know where it is?

And yes, I agree to the above points BUT it would be nice to have a *better* search framework so that users can seamlessly switch between Solr and Sphinx or back to core search without theming, etc issues.

So seeing as we don't have a better one, I'm a little reticent to move off of core search. I'm actually fine with it, but I think we should make sure we maintain compatibility.

#2

pwolanin - March 18, 2009 - 21:56

hmm, I can't find it either.

#3

coupet - March 18, 2009 - 22:39

#4

pwolanin - March 18, 2009 - 22:46

@coupet - no, this would be an issue for just this module.

#5

janusman - April 2, 2009 - 14:48

It would be great if we could come up with the different scenarios for/against dependancy on core search. here's a possible starting list:

Cases when removal of core search dependancy is good:
* Don't need core search, and will no longer have core search indexing what is already on the Solr index.
* ??

Cases when it's bad:
* D7 or later gets the Search API it deserves, and Apache Solr module would have to "go back" and integrate with that.
* Would have to duplicate functionality offered in other modules (like OpenSearch which can now provide RSS for Apache Solr results).
* ??

#6

David Lesieur - April 16, 2009 - 21:52

Would it be too far-fetched to support two interfaces, one that would stand by itself, and another based on hook_search(), by refactoring some stuff into separate modules?

#7

pwolanin - April 16, 2009 - 22:29

@David - that was basically my intention, since the amount of code specific to hook search is actually minimal.

#8

David Lesieur - May 28, 2009 - 16:06

With #469642: Pull facet blocks out of apachesolr_search.module, we could have a small step done to take some code out of apachesolr_search.module, to favor its re-use by other modules such as a potential search module that would not be dependent on core search.

#9

pwolanin - June 9, 2009 - 15:35

Looking at this now - a little trickier than I initially thought since we use user_access('search content') and there is various block and theme code.

#10

pwolanin - June 11, 2009 - 01:47
Status:active» needs work

WIP, non-functional.

AttachmentSize
WIP-405206-10.patch 13 KB

#11

pwolanin - June 17, 2009 - 20:44

Thinking about htis more - it would be easier to just form_alter to allow 0 nodes indexed by core node search (thanks Jody).

#12

pwolanin - June 17, 2009 - 22:55
Title:Remove dependency on search module» Allow Apache Solr to be the default, let search module index 0 nodes per cron run
Status:needs work» needs review

new title, patch.

AttachmentSize
make-default-405206-12.patch 6.27 KB

#13

JoshuaRogers - June 18, 2009 - 06:59
Status:needs review» reviewed & tested by the community

It seems to work properly for me. :)

#14

JacobSingh - June 18, 2009 - 08:01
Status:reviewed & tested by the community» fixed

Committed...

Accidentally let CVS but the wrong comment in with -m on the command line once, but got it in proper.

#15

DamienMcKenna - June 23, 2009 - 06:05

Thank you for this, I was really confused why core Search needed to be used given the entire engine was being replaced. I will give the next beta a good solid thrashing on a 70k+ node site.

#16

System Message - July 7, 2009 - 06:10
Status:fixed» closed

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

#17

moshe weitzman - November 3, 2009 - 11:48

Thanks for this. I had to make a special accomodation for this clever hack in the search index command in drush. Search for Apachesolr at http://cvs.drupal.org/viewvc/drupal/contributions/modules/drush/commands...

 
 

Drupal is a registered trademark of Dries Buytaert.