Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module is currently incompatible with the 2 branch of Apache Solr module.
Comment | File | Size | Author |
---|---|---|---|
#29 | 817702-29.patch | 27.12 KB | jpmckinney |
#28 | 817702-28.patch | 26.09 KB | jpmckinney |
#27 | 817702-27.patch | 24.41 KB | jpmckinney |
#25 | 817702-25.patch | 22.88 KB | jpmckinney |
#14 | apachesolr_multisitesearch-817702.patch | 10.49 KB | wmostrey |
Comments
Comment #1
q0rban CreditAttribution: q0rban commentedSo, everything here seems to be working, except that on my localhost, urls in results from the site in which the search originated show the base url as 'default', ie http://default/foo/bar. I can't figure out why this is happening, it's as if it's looking at the dir that the settings.php file is in.
Comment #2
q0rban CreditAttribution: q0rban commentedOk, this is only happening to me locally, when I push this to a server, it works fine, however it is to be noted that the sites I'm testing with on the server are Drupal multisites, so the directory they are in is the actual domain name of the site. Therefore the whole 'default' thing may still be an issue on sites where settings.php is located in
sites/default
. More testing needed.Comment #3
q0rban CreditAttribution: q0rban commentedTake 2, fixes paging and overall cleans up the patch (as in less changing).
Comment #4
slip CreditAttribution: slip commentedNice work q0rban! I'm using the solr multisite module w/ your patch.
I've updated the patch. My version has your changes + a few fixes for breadcrumbs, the admin interface (s/apachesolr_index_updated(time());/apachesolr_index_set_last_updated(time());/) and the current search block.
Comment #5
robertDouglass CreditAttribution: robertDouglass commentedReroll. Untested.
Comment #6
robertDouglass CreditAttribution: robertDouglass commentedWhy is search_view re-implemented?
Comment #7
robertDouglass CreditAttribution: robertDouglass commentedThis is the patch that I'm using and testing. It's removed the re-implementation of search_view.
Comment #8
robertDouglass CreditAttribution: robertDouglass commentedJust fixed the whitespace issue.
Comment #9
robertDouglass CreditAttribution: robertDouglass commentedHere's the latest that I'm using.
Comment #10
wmostrey CreditAttribution: wmostrey commentedRobert's patch in #9 is a great starting point for 6.x-2.x-dev. Tested it extensively and it works.
Comment #11
robertDouglass CreditAttribution: robertDouglass commentedNow with spelling suggestions and snippet highlighting.
Comment #12
wmostrey CreditAttribution: wmostrey commentedRe #11: Tested with two basic sites running Solr, no Nutch involved.
admin/settings/apachesolr/multisite-filters
).Comment #13
wmostrey CreditAttribution: wmostrey commentedSearch results from all sites appear with the patch in #5, but not with the one in #11.
Comment #14
wmostrey CreditAttribution: wmostrey commentedHere's the version we're currently using.
Comment #15
jpmckinney CreditAttribution: jpmckinney commentedNote that #11 (and #14) contains a useful snippet from #990254: Doesn't work with spellchecker and suggestions
Comment #16
jpmckinney CreditAttribution: jpmckinney commentedMarked #742602: Problems with cron duplicate
Comment #17
jpmckinney CreditAttribution: jpmckinney commentedComment #18
jpmckinney CreditAttribution: jpmckinney commented#11 and #14 differ in that in #11 apachesolr_multisitesearch_view delegates to apachesolr_search_view, but #14 instead re-implements apachesolr_search_view. #14 is right, because apachesolr_search_view will not call apachesolr_multisitesearch_search, which we want it to do.
I don't know why #11 removes the apachesolr_multisitesearch_has_searched() check from apachesolr_multisitesearch_block. #11 adds a $caller parameter to apachesolr_multisitesearch_search, but it seems to do so uselessly, as nothing calls apachesolr_multisitesearch_search with a third parameter (in fact, in #11 I don't think anything calls apachesolr_multisitesearch_search). I don't know why #11 adds a second condition here:
Future patches should not contain regressions mentioned in #12 and #13.
Comment #19
pwolanin CreditAttribution: pwolanin commentedShould we have a 6.x-2.x branch? Not sure it will/should ever have more than a -dev release.
Comment #20
wmostrey CreditAttribution: wmostrey commentedI'm all for adding a 6.x-2.x release. We at Telenet will be using and supporting this version on multiple production sites.
Comment #21
pwolanin CreditAttribution: pwolanin commentedFeel free to make the branch, but again, I consider 6.x-2.x pretty much EOL.
Comment #22
wmostrey CreditAttribution: wmostrey commentedI know, which I think is a shame...
I don't have commit access to this project.
Comment #23
jpmckinney CreditAttribution: jpmckinney commentedI'll create the branch and review the patch in the next two weeks.
Comment #24
pwolanin CreditAttribution: pwolanin commentedWell, the goal is to make a 6.x-3.x that's compatible with 7.x-1.x. I'd expect that here also, and ideally most of the important 6.x-2.x feature will exist in some form there.
Comment #25
jpmckinney CreditAttribution: jpmckinney commentedIncremental diff to the patch in #14.
I think it's safe to use apachesolr_search_language_name to theme the language facet.
I've brought a bunch of functions in line with their apachesolr 6.x-2.x counterparts and added @see comments where appropriate:
* apachesolr_multisitesearch_enabled_facets_form
* apachesolr_multisitesearch_view
* apachesolr_multisitesearch_execute
* apachesolr_multisitesearch_has_searched
* apachesolr_multisitesearch_block
* apachesolr_multisitesearch_enabled_facets
Got rid of apachesolr_multisitesearch_basic_params and instead appended to the fl param in apachesolr_multisitesearch_apachesolr_modify_query.
Got rid of apachesolr_multisitesearch_process_response and instead changed link, type, and user in apachesolr_multisitesearch_apachesolr_process_results.
Comment #26
jpmckinney CreditAttribution: jpmckinney commentedBrought apachesolr_multisitesearch_form_search_form_alter in sync with apachesolr module.
Change:
to
Change:
to:
Got rid of
empty($form_state['post'])
check as it doesn't exist in apachesolr.I think the current code may behave badly with apachesolr_search_browse.
I can't bring apachesolr_multisitesearch_add_facet_params in sync without implementing a multisearch version of apachesolr_get_facet_definitions
Comment #27
jpmckinney CreditAttribution: jpmckinney commentedComment #28
jpmckinney CreditAttribution: jpmckinney commentedHere's a patch that can be applied against a fresh git checkout.
Comment #29
jpmckinney CreditAttribution: jpmckinney commentedBrought apachesolr_multisitesearch_currentsearch in sync with apachesolr module.
There is a ton of duplication of code here from the apachesolr module, and most of it is due to the fact that we re-implement the facet system. Why can't we reuse apachesolr's facet system? Do we really need these parallel systems? It adds a big maintenance burden on this module and makes it a few hundred lines longer.
As mentioned above, I can't bring apachesolr_multisitesearch_add_facet_params in sync without implementing a multisearch version of apachesolr_get_facet_definitions. Also, the current code will behave badly with apachesolr_search_browse. I'm postponing any more personal work on this module until I understand why we implement a parallel facet system.
Comment #30
pwolanin CreditAttribution: pwolanin commented@jpmckinney - the ad-hoc design of the facet system and the duplication it leads to is part of why we're putting so much effort into using the more abstracted Facet API module for 7.x, with a planned/hoped 6.x-3.x backport.
Comment #31
wmostrey CreditAttribution: wmostrey commentedPeter,
Could we get a 2.x-dev release, based on #14 to start patching against? I used that version as a starting point for the D7 version at #1006994: Port Apache Solr Multisite Search to Drupal 7.
Feel free to add me as a co-maintainer so I can manage both (as mentioned in #21). I know 2.0 is pretty much EOL but it's still much used, and it's a great version between the upcoming 7 and a future back-ported 6.3.
Comment #32
wmostrey CreditAttribution: wmostrey commentedMarking as a duplicate of #1006994: Port Apache Solr Multisite Search to Drupal 7 (which now has a patch to test) since 6.2 is EOL.
As per the roadmap we'll fix the Drupal 7 version first, and then back-port to 6.3.