-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactored reindex command * added documentation for reindex-command * added upgrade for index-rebuild * fixed return of drop-index * fixed description of 'clear' option * fixed question output
- Loading branch information
1 parent
9e8dd24
commit 0180a81
Showing
6 changed files
with
235 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Commands | ||
|
||
## Reindex command | ||
|
||
The reindex command can be used to rebuild the elastic-search index of the articles. | ||
|
||
```bash | ||
bin/adminconsole sulu:article:reindex | ||
bin/websiteconsole sulu:article:reindex | ||
``` | ||
|
||
The default behaviour of the command is to load all the articles and update the content of them. This includes that | ||
deleted articles (which was not removed correctly from index) will stay inside the index. | ||
|
||
To avoid this behaviour you can use the `--clear` option to remove all the articles from the index before reindex the | ||
existing ones. | ||
|
||
```bash | ||
bin/adminconsole sulu:article:reindex --clear | ||
bin/websiteconsole sulu:article:reindex --clear | ||
``` | ||
|
||
Sometimes you want to update also the mapping of the index. To achieve this you can use the `--drop` option. This will | ||
drop and recreate the index with the current mapping. | ||
|
||
```bash | ||
bin/adminconsole sulu:article:reindex --drop | ||
bin/websiteconsole sulu:article:reindex --drop | ||
``` | ||
|
||
This options will answer you the confirm this operation. To avoid this interaction you can use the `--no-interaction` | ||
option. | ||
|
||
```bash | ||
bin/adminconsole sulu:article:reindex --drop --no-interaction | ||
bin/websiteconsole sulu:article:reindex --drop --no-interaction | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters