Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## 5.0.6 - 2025-06-02
### Fixed
- Fixed an issue when Craft Commerce was installed but not enabled ([#368](https://github.com/studioespresso/craft-scout/issues/368))

### Added
- Importing indexes with multiple element types now echo the element count for each type ([#366](https://github.com/studioespresso/craft-scout/issues/366))

## 5.0.5 - 2025-03-28
### Fixed
- Fix regression when indexRelations is false ([#364](https://github.com/studioespresso/craft-scout/pull/364))
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "studioespresso/craft-scout",
"description": "Craft Scout provides a simple solution for adding full-text search to your entries. Scout will automatically keep your search indexes in sync with your entries.",
"type": "craft-plugin",
"version": "5.0.5",
"version": "5.0.6",
"keywords": [
"craft",
"cms",
Expand Down Expand Up @@ -53,7 +53,8 @@
"scripts": {
"check-cs": "ecs check --ansi",
"fix-cs": "ecs check --ansi --fix",
"phpstan": "phpstan --memory-limit=1G"
"phpstan": "phpstan --memory-limit=1G",
"ci": "ecs check --ansi --fix && phpstan --memory-limit=1G"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions src/console/controllers/scout/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,17 @@ public function actionImport($index = '')
$elementsUpdated = 0;

foreach ($engine->scoutIndex->criteria as $query) {
$totalElements = $query->count();
$elementsUpdated = 0;
$batch = $query->batch(
Scout::$plugin->getSettings()->batch_size
);


foreach ($batch as $elements) {
$engine->update($elements);
$elementsUpdated += count($elements);
$this->stdout("Updated {$elementsUpdated}/{$totalElements} element(s) ({$query->elementType}) in {$engine->scoutIndex->indexName}\n", Console::FG_GREEN);
}
}
} else {
Expand Down
Loading