From http://www.drupalusability.org/node/3 it's clear that users and experienced Drupalers alike don't understand what the "Re-index search" button does or how they can get content indexed so search starts to work.
On the search/* pages or admin/settings/search page, use drupal_set_message("Some content may not show up in search because only %percent of your site's published content has been indexed. You can run cron manually (link) to index some content", 'error') to show users why no content is showing up, and how they can fix it. This message should only be shown to users with the 'administer site configuration' permission since they can also run cron manually.
We should also look into removing the re-index button and performing that action automatically when any search settings are changed.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 394102-search-usability-D7.patch | 16.46 KB | dave reid |
| #4 | 394102-before-search-no-results.png | 99.84 KB | dave reid |
| #4 | 394102-before-search-reindex.png | 95.42 KB | dave reid |
| #4 | 394102-before-search-settings.png | 107.68 KB | dave reid |
| #4 | 394102-after-search-no-results.png | 104.31 KB | dave reid |
Comments
Comment #1
Bojhan commentedWhen will this message be set? at 99% of not indexed? What are the edge cases?
Comment #2
dave reidI'm envisioning this message will only be shown to users with the 'administer search' permission, and when there are un-indexed content that might not show up in search. So it may be 0% indexed, or 99% indexed, there is still reason to show the message. I will post some screenshots tomorrow for textual review.
Comment #3
dave reidComment #4
dave reidChanges in patch:
- Reworks, revises, and simplifies the admin/settings/search page. Displays an index status warning if the search index is not 100%. This warning provides a link to run cron manually.
- Tries to make clear that the re-index button just clears the index and that the actual indexing action happens during cron.
- On search pages, if the user has the 'administer search' permission, display the same index status warning with the cron link.
- Adds a search index status to the site's status report, again with a link to run cron manually.
- If there are 49 indexed nodes and 1 unpublished (and unindexed) node, it now shows the index status at 100% instead of -1%.
- The biggie: automatically runs search_cron() when the search module is enabled. Search should work right from the start.
EDIT: The search settings screenshots show the result of submitting the reset search index form (the preceding screenshot)
Comment #5
dave reidComment #6
keith.smith commentedI haven't read the entire patch. Just tagging so that I do.
The changes I read look pretty positive. One quick note: "show up in" -> "appear in".
Comment #7
Bojhan commentedMarking for needs review, trying to make sense of all the screenshots. It sounds like we either need a screencast or I need to install it to my local head, to really try this.
Comment #8
catchCouple of things.
I like reset index better than re-index, good change.
Not keen on a status report message at 99% - 1. it will annoy me 2. I will quickly learn to ignore it. Could we make the logic: "If search index is less than 100% and the number of items in the queue is greater than the number to be indexed per cron run"? Don't think we need any text changes but it'd save showing the message every time someone posts content on the site (pretty much) - then we only get warned if cron isn't running frequently enough or on initial indexing / re-indexing.
Not looked at the patch yet but the screenshots and summary look really nice.
Comment #9
dries commented- I don't want the message to be too "nag-y" either. Without actually testing it, it is hard to say if it actually is.
- I thought we already had a global "nag" message about cron not being run.
- Running cron when the module is enabled might or might not be useful. One cron run might only index 2% of my site, and it might take various seconds to do so, making the modules page really slow.
So in short, I like some of the visual clean-up, but don't necessarily like some of the /functional/ changes.
Comment #10
dave reidThanks for the reviews everyone.
I agree I could probably rework the search index status on the status report page to do:
= variable_get('search_cron_limit', 100) ? REQUIREMENT_WARNING : REQUIREMENT_OK);But I think having the 'warning' on the search pages is valid since it's saying "hey, you search administer user, not all the results might be shown here. here's how you can fix it without even leaving this page!" :)
Running search_cron() with search_enable() was questionable. At least it's a start. :)
Comment #11
Bojhan commentedComment #13
douggreen commentedI independently worked on UI at DrupalCon Paris, and was pointed towards this issue. See also #568350: UI cleanup of status and re-index button. We need to integrate these two patches.
Comment #14
douggreen commentedPlease continue this discussion on #568350: UI cleanup of status and re-index button.