Move all indexing/de-indexing work to queue #255
Replies: 5 comments 2 replies
-
Hey @janhenckens — sorry for the delay! One thing I think needs to be added to the end of the // Only process the related elements if Scout is directed to
if (!Scout::$plugin->getSettings()->indexRelations) {
return;
}
$element->getRelatedElements()->each(function (Element $relatedElement) {
/* @var SearchableBehavior $relatedElement */
$relatedElement->searchable(false);
}); Right now everything works as expected except related element processing. These are currently not being updated during the Indexing job (when the option is enabled). Here's why I think it works on the current version of Scout (but not the beta):
|
Beta Was this translation helpful? Give feedback.
-
Just letting you know that we've been using this on a site since the 16th and so far so good, @janhenckens! |
Beta Was this translation helpful? Give feedback.
-
Hey @janhenckens — we're due to upgrade a site that's currently using 2.8.0-beta2 to Craft 4. Has that work been added to the Craft 4 version of this plugin? It looks like it has but wanted to double check with you! |
Beta Was this translation helpful? Give feedback.
-
Hey @aaronbushnell, there's a Craft 4 version out but I'd have to double check to see if you the queue improvements you suggested/made in the beta for 3 are included in the current Craft 4 release. I'm at a conference for the rest of the week, I'll try to get back to you middle of next week! |
Beta Was this translation helpful? Give feedback.
-
@aaronbushnell The current release ( |
Beta Was this translation helpful? Give feedback.
-
This is the culmination of #248, #171 and #247 by @aaronbushnell and @EpocSquadron.
Previously Scout would do the checking of wether or not something would need to be indexed or de-indexed inline and then do the indexing in a job if you had the
queue
config setting enabled. (de-indexing was always done inline)The idea here is to move the checking to its own queue job, which has a significant impact on saving and editing.
You can try this by installing Scout like this:
This deprecates the
queue
setting and will thus no longer give you the option to run Scout without the queue.Happy to hear your thoughts and feedback!
Beta Was this translation helpful? Give feedback.
All reactions