Make search module usable

Dave Reid - March 7, 2009 - 15:40
Project:Drupal
Version:7.x-dev
Component:search.module
Category:task
Priority:normal
Assigned:Dave Reid
Status:duplicate
Issue tags:Needs tests, Needs text review, Needs usability review, UBUserTesting2009, Usability
Description

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.

#1

Bojhan - March 8, 2009 - 03:57

When will this message be set? at 99% of not indexed? What are the edge cases?

#2

Dave Reid - March 10, 2009 - 03:54

I'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.

#3

Dave Reid - April 3, 2009 - 01:57
Status:active» needs review
Issue tags:+Needs screenshot, +Needs tests
AttachmentSizeStatusTest resultOperations
394102-search-usability-D7.patch16.4 KBIdleFailed: Failed to apply patch.View details | Re-test

#4

Dave Reid - April 3, 2009 - 02:18

Changes 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)

AttachmentSizeStatusTest resultOperations
394102-search-usability-D7.patch16.46 KBIdleFailed: Failed to apply patch.View details | Re-test
394102-before-searching.png99.84 KBIgnoredNoneNone
394102-before-search-reindex.png95.42 KBIgnoredNoneNone
394102-before-search-settings.png107.68 KBIgnoredNoneNone
394102-after-search-no-results.png104.31 KBIgnoredNoneNone
394102-after-search-reindex.png93.99 KBIgnoredNoneNone
394102-after-search-settings.png108.42 KBIgnoredNoneNone
394102-after-status-report.png117.03 KBIgnoredNoneNone

#5

Dave Reid - April 3, 2009 - 02:19
Title:Show "site not indexed" warning on the no results search page» Make search module usable

#6

keith.smith - April 3, 2009 - 02:54
Issue tags:+Needs text review

I 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".

#7

Bojhan - April 3, 2009 - 09:44

Marking 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.

#8

catch - April 3, 2009 - 10:00

Couple 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.

#9

Dries - April 4, 2009 - 00:06

- 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.

#10

Dave Reid - April 4, 2009 - 00:20

Thanks 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. :)

#11

Bojhan - April 10, 2009 - 09:46

#12

System Message - April 14, 2009 - 04:45
Status:needs review» needs work

The last submitted patch failed testing.

#13

douggreen - September 5, 2009 - 10:48

I 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.

#14

douggreen - September 5, 2009 - 13:19
Status:needs work» duplicate

Please continue this discussion on #568350: UI cleanup of status and re-index button.

 
 

Drupal is a registered trademark of Dries Buytaert.