At the moment the top of admin/config/search/settings contains options for reindexing content, and settings that apply to how content is stored in the index.

Of the default search pages, these apply to the content (node) search, but not to the user search. There is nothing in the user interface to explain that these settings apply only to the content search even indicate that the user search is not indexed.

Any solution needs to work with search pages provided by contrib modules. We do not know whether these search pages will be indexed or not.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

So... All of these settings are part of the "Indexing Settings" section of the admin form. There is already some information text there that says:

Changing the settings below will cause the site index to be rebuilt. The search index is not cleared but systematically updated to reflect the new settings. Searching will continue to work but new content won't be indexed until all existing content has been re-indexed.

The default settings should be appropriate for the majority of sites.

All we probably need to do is add additional text to that that explains that these settings only apply to pages that use the Search module's search index, such as the Content search page type, but not the User search page type.

jhodgdon’s picture

As a note, there is also hook_help() text at the top of the admin/config/search/settings page that says:

The search engine maintains an index of words found in your site's content. To build and maintain this index, a correctly configured cron maintenance task is required. Indexing behavior can be adjusted using the settings below.

That should almost certainly also be updated, and there is some text in the main module hook_help() page that is also not great; there is also a separate issue for generically updating the hook_help():
#2091359: Update hook_help for Search module

ianthomas_uk’s picture

If we're going to have some generic settings that only apply to some search pages, then the first thing we need to do is label which search pages they apply to. At the same time we can break down the index status per-index.

screenshot showing new column

If we do this, then we can refer to indexed vs not indexed in our descriptions and help text. I'm open to suggestions on exact terminology, I avoided the word status because we already had a status column and I couldn't think what that could be renamed to.

Is this a good approach?

jhodgdon’s picture

I very much like the idea in #3. Actually, I implemented something very similar in my contrib Search by Page module for 7, which broke down the indexing status for existing search modules and Search by Page "environments" (which are essentially like the Pages in 8). So I'm glad to see this idea resurfacing. :)

A few UI thoughts:

a) At the top of the page, it's called "indexing status" and in the table it is "indexing progress". Let's make them consistent, and I think "status" is probably better... Although there is also the previous column "status" in the table that is the page status... so maybe change both of them to be "progress?

b) When I built the Search by Page version, I decided that the absolute numbers were better to display in the table than percentages... I still think so. Maybe it could say "N of M items indexed" instead of a percentage? Or if that is too long, maybe just "N/M indexed" or "N of M indexed"? My reasoning is that since the indexing cron throttle is a number of items that is indexed per cron run, it seems like the absolute numbers are more relevant than the percentage.

c) I don't think I like "No index required". How about "Does not use index" or "Not indexed" or "Does not use index" or just "Not applicable"? Actually, I think "Not applicable" might be the best?

d) This does make the table wider. Does it make it less usable for Mobile?

ianthomas_uk’s picture

a) I think both should be progress, unless someone can come up with an alternative term for the existing status column.
b) I agree about absolute numbers, I just used percentages because that's what the UI already did.
c) "Not indexed" implies that you need to do something to make it indexed. "Not applicable" doesn't explain why it's not applicable. "Does not use index" would work though.
d) Several columns disappear below a certain screen size, this will increase that breakpoint, so more devices will see the mobile version. We could perhaps increase some or all of the other columns to RESPONSIVE_PRIORITY_MEDIUM.

jhodgdon’s picture

On (d), wow can we do that? That seems like a good idea. It seems to me that the priority order for the columns would be something like:
- Label / Status / Operations - essential
- Indexing progress - probably next, since it also tells you whether the page uses the index or not?
- URL - medium (seems useful)
- Type - less important (you probably know the type from the label you gave it?)

jhodgdon’s picture

Oh and I'd point out that the UI at the top gives you both a percentage and a number of items remaining. :)

jhodgdon’s picture

We should revive this issue. ianthomas_uk - I think your patch was 90% there. Do you want to make a new patch?

ianthomas_uk’s picture

Status: Active » Needs review
FileSize
1.7 KB

After a "short" delay, here's a patch with those changes.

a) Both are now "Indexing progress"
b) "x of y indexed"
c) "Does not used index"
d) I've increased status from low to always shown, and inserted progress as medium. Url and type remain low, while label, operations and now status are always shown.

ianthomas_uk’s picture

FileSize
1.7 KB

This is identical to #9 except the case of "Indexing progress" is now consistent between the two calls.

The last submitted patch, 9: search-2178651-9.patch, failed testing.

ianthomas_uk’s picture

The test failure on #9 is a test running out of memory on some bots, nothing to do with this change.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Love it! Thanks ianthomas_uk!

I've looked over the code in this very straightforward patch, and also tested it manually (including the responsive table). It looks perfect to me. The test bot is also happy... Let's do it!

I guess I'm only left wondering whether we should add a test...

We're currently testing indexing status in general in SearchMultilingualEntityTest, but we are not currently testing the UI for this at all (as also noted in #1288442-2: Add search index status to the Status Report page). So it seems like we need to the following UI checks to SearchMultilingualEntityTest:

a) If you visit the search settings page, you see the indexing progress displayed there.

b) If this issue goes in, you also see the indexing progress displayed on the NodeSearch page.

c) If the update to the status report issue goes in, you also see the indexing progress displayed in the Status Report page.

Both this issue and the Status Report issue are ready to go (aside from tests)... so what I think I'd like to do is go ahead and mark this one as RTBC, since that other issue is already at needs work / tagged "needs tests", and just add tests for all 3 UI pieces on that other issue. I hope that's an OK strategy. I'll make a note there.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Sure add tests in the the other issue.

Committed e5d8fce and pushed to 8.x. Thanks!

  • alexpott committed e5d8fce on 8.x
    Issue #2178651 by ianthomas_uk: Fixed Consider UX implications of...
jhodgdon’s picture

Great, thanks for the quick commit! I've now written tests on #1288442: Add search index status to the Status Report page (which could use a review, hint hint!).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.