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.
Title describes the problem, discovered using drush. #880554: search-index never completes, but admin/settings/search shows site as 100% indexed
Easy to implement the hook. Compare to: http://api.drupal.org/api/drupal/modules--node--node.module/function/nod...
Comments
Comment #1
agentrickardReference: http://api.drupal.org/api/drupal/modules--search--search.api.php/functio...
Comment #2
agentrickardMoving.
Comment #3
barbi CreditAttribution: barbi commentedNewbie here. Interested in this issue.
Does the search_dataset store a "user" type? Please correct me if I am wrong.
Comment #4
agentrickardYou are absolutely correct. It doesn't store any data in search by default, so this isn't technically needed. If it were, it would always return 100%, since it runs its search against {user} and not {search_index}.
Really, then, we should make user data indexed properly by search. Doing so would allow fielded user data to be index by core search.
Thanks, @barbi
Comment #5
barbi CreditAttribution: barbi commentedThe user_search_execute uses a query against username and email with a LIKE clause. Hence there is no indexing and storing in the search_dataset.
By Fielded user data, you mean more fields from the user table? For example IRC nick.
Comment #6
agentrickardYes, fields attached to the user object using FieldAPI, which can include things like IRC nick or any arbitrary data.
Comment #7
moshe weitzman CreditAttribution: moshe weitzman commentedSearch API module implements indexing for all entities, so thats the way forward for users.
I have no idea why user module even bothers implementing search hooks. It should just add search boxes on admin/people and those boxes should do the queries against user.
Comment #16
quietone CreditAttribution: quietone as a volunteer commentedI reckon this was fixed In #2003482: Convert hook_search_info to plugin system where hook_search was converted to using SearchPlugins. Since this is tagged for backport to Drupal 7 changing version.