My module extends Drupal core search so that it can index taxonomy terms with their fields rendered. It is based off the functions that index and search nodes, and allows other developers to interact with a hook before terms are indexed, or a hook before search results are returned. In addition, the module allows site admins to decide exactly which vocabularies they want indexed for search. With this option, tagging vocabularies can be excluded where necessary.
I have not been able to find any modules that provide the same functionality. The 'Taxonomy Search' module, last available on Drupal 5, was more of a faceted search addition to nodes, but didn't index terms as separate, searchable entities.
The code has been run through the Ventral online tester.
My Project: http://drupal.org/sandbox/scottho/1425132
Git access: git clone --branch 7.x-1.x http://git.drupal.org/sandbox/scottho/1425132.git term_search
My Reviews:
http://drupal.org/node/1413866#comment-5702328
http://drupal.org/node/1189362#comment-5701746
http://drupal.org/node/1402752#comment-5703392
Comments
Comment #1
rade commentedManual review:
- Enabled module, went to admin/config/search/settings and enabled Term Search under "Active search modules", got these warnings:
-> You need to provide a default value for $vocabularies, e.g. array().
- Ran cron to re-index site, got these warnings:
-> Same thing here, you need to provide a default value for $vocabularies if the variable is not set.
- You use db_query and db_query_range in many places. In Drupal 7 you should use db_select instead. Please see http://api.drupal.org/api/drupal/includes--database--database.inc/functi...
- Lines 108-109 are commented. If they are not needed they could probably be removed?
- PAReview returned 0 issues, very good!
Otherwise this seems like a nifty module! Please fix these issues and I will get back to you.
Cheers,
Rade
Comment #2
scotthorn commentedThanks for the review! I am working on changing the sql queries to the dynamic api, and I will update the status once I have tested everything.
Comment #3
scotthorn commentedI updated to the dynamic query API, and added an implementation of hook_search_reset that I realized was missing. I ran the module through the Ventral tester again, so it should be ready for another review. Thanks!
Comment #4
sam152 commentedGreat idea for a module.
Here are a few things in my experience of downloading and using it:
Keep up the hard work, I think once it's polished, this module will be a great addition.
Sam
Comment #5
scotthorn commentedThank you for reviewing! As for the issues you raised:
tags. This function is just for the indexing, and it uses h1 for result weighting.
Again, thanks for your time and help.
Comment #6
scotthorn commentedAdding PAReview: review bonus
Reviews above.
Comment #7
klausiYou should post your review links to the issue summary, as stated in #1410826: [META] Review bonus.
Review of the 7.x-1.x branch:
This automated report was generated with PAReview.sh, your friendly project application review script. You can also use the online version to check your project. Get a review bonus and we will come back to your application sooner.
manual review:
$text = '<h1>' . check_plain($term->name) . '</h3>' . $term->rendered;": Opening h1 but closing h3?Removing review bonus tag, you can add it again if you have done another 3 reviews of other projects.
Comment #8
scotthorn commentedThanks for the review, Klausi, and sorry for the delay. This is the first chance I've had to work on personal projects in a while. I have fixed all of the code bits you mentioned, wrote a detailed .api.php page, and beefed up the project page. I still get a couple errors from the Ventral online test that I can't seem to get rid of:
http://ventral.org/pareview/httpgitdrupalorgsandboxscottho1425132git
These pop up around my @param and @return sections of the hook comments. I based my documentation off the similar hook_node_update_index and hook_node_search_result functions, so hopefully it's something off in Ventral.
When I put this comment on one line, it complains that the line is eight characters too long.
Since these are both fairly minor I'm marking this for review again. Thanks for your help!
Comment #9
klausiSorry for the delay. Make sure to review more project applications and get a new review bonus and this will get finished faster.
Regarding the doc data types: the coding standards recommend using them for @param and @return. Example: "@param string name", "@return array". See http://drupal.org/node/1354#functions
manual review:
term_search_update_index(): no need to use check_plain() in this function as you are not printing anything to the user here.
But otherwise looks RTBC to me.
Comment #10
klausiNo objections for more that a week, so ...
Thanks for your contribution, scotthorn! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
As you continue to work on your module, keep in mind: Commit messages - providing history and credit and Release naming conventions.
Thanks to the dedicated reviewer(s) as well.
Comment #11
scotthorn commentedThanks for all the reviews and helpful comments! The full project can now be found here:
http://drupal.org/project/term_search
Comment #12.0
(not verified) commentedAdded old reviews for the pareview bonus