Closed (won't fix)
Project:
Drupal core
Version:
7.x-dev
Component:
search.module
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Feb 2013 at 22:53 UTC
Updated:
6 Sep 2013 at 22:04 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedComment #3
pwolanin commentedI'm not sure what that failure is - looks like an upgrade path issue.
Here's a revised patch that adds API docs.
Comment #4
jhodgdonThanks! Can we make a couple of changes to the documentation of the new hook?
a) Write out the word "information" instead of "info" in the first line.
b) Name the parameter something else. I realize that in the search module code, it is called $search_hooks, but that doesn't actually make much sense in the context of this hook documentation. How about $search_info or $search_type_info?
c) Describe better what is in the parameter array. hook_search_info() just lets you return one array of search information, which is well-described. This alter hook has an array of these items. So I think a better description would be something like:
Associative array of search type information, whose keys are the short names of the modules supplying the search types, and whose values are their return values from hook_search_info().
(Maybe that can be written in a better way, but something getting across that information would be better than what is in there now.)
d) And do we need a test for this new alter hook?
Comment #5
pwolanin commentedComment #6
jhodgdonThis looks like a straightforward fix to me, and I'm happy with the documentation. I think it might even be backportable to D7, which would probably make Solr happy? :)
Comment #7
pwolanin commentedYes, I hope we can backport. For 7 it would make it easier to integrate Facet APi with core search - Apache Solr integration already provides a conditions callback, though this alter would let people modify it if needed.
Comment #8
xjm#5: search-info-alter-1911276-5.patch queued for re-testing.
Comment #9
xjmI think this is technically a feature request, but I agree that it can be backported.
Comment #10
jhodgdon#5: search-info-alter-1911276-5.patch queued for re-testing.
Comment #11
pwolanin commented#5: search-info-alter-1911276-5.patch queued for re-testing.
Comment #14
jhodgdonLooks like we need a reroll of this patch.
Comment #15
pwolanin commentedThe alter is being handled in #2003482: Convert hook_search_info to plugin system for Drupal 8 per timplunkett, so moving this issue to Drupal 7
Comment #16
pwolanin commentedComment #17
jhodgdonOK...
a) I think we need a test for this to verify it is working as documented.
b) I think a couple of small tweaks to the documentation would help:
- The @param should say it's an associative array keyed by the name of the module that provided hook_search_info().
- The sample function body should reference callback_search_conditions(), which is defined later in the search.api.php file (and provides a template for the conditions callback functions).
Comment #18
jhodgdonAt this point... We don't consider feature requests to D7 do we? So we should just drop this idea?