Skip to content

Large amounts of "Updating search indexes" jobs when editing content #9801

Closed Answered by brandonkelly
mmikkel asked this question in Q&A
Discussion options

You must be logged in to vote

I just realized that this change in 3.6.5 introduced a bug, where Matrix/Neo/Super Table blocks are now getting search keywords indexed even if they belong to a revision. Just fixed that for the next release, which will help somewhat. (af8c200)

I wonder if this could be solved via debouncing, rather than completely eliminating search indexes for drafts. Maybe they only get updated once a minute or so per entry.

In the meantime, I’ve just added a new EVENT_BEFORE_UPDATE_SEARCH_INDEX event to the Elements service for the next release (315e811), which you can use to prevent the search index from getting updated for drafts like so:

use craft\events\ElementEvent;
use craft\helpers\ElementHelper;

Replies: 2 comments 10 replies

Comment options

You must be logged in to vote
4 replies
@mmikkel
Comment options

@brandonkelly
Comment options

@lesaff
Comment options

@brandonkelly
Comment options

Answer selected by brandonkelly
Comment options

You must be logged in to vote
6 replies
@FreekVR
Comment options

@FreekVR
Comment options

@brandonkelly
Comment options

@FreekVR
Comment options

@brandonkelly
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants