Added list-orphans and clear-orphans sub-commands to the `search-…#7044
Merged
smotornyuk merged 3 commits intoOct 7, 2022
Merged
Conversation
smotornyuk
reviewed
Sep 8, 2022
Member
|
In addition to review comments:
|
…hans` to always return a str list. Changed the `indexed_package_ids` to a pagination loop at a 1000 iteration. Used `click.echo` instead of `pprint`. Added another output message on how many orphaned packages were found. Added changelog file.
Contributor
Author
|
@smotornyuk I have done all of your suggested changes. I also ran The changelog file has also been added. |
Contributor
Author
|
@smotornyuk nevermind regarding the Because of the line length, I did end up putting the |
JVickery-TBS
pushed a commit
to open-data/ckan
that referenced
this pull request
Jun 27, 2023
…emove-orphans Added `list-orphans` and `clear-orphans` sub-commands to the `search-… # Conflicts: # ckan/cli/search_index.py
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…index` command.
Fixes #
Adds sub-commands to
search-indexto list and clear any orphaned package indexes.Background info:
We ran into an issue in which there were some left-over packages in the solr index, despite that the packages were purged from the database. So we had a report of a few packages not existing but still coming up in the searches due to the solr index. We had to just run
ckan search-index clear DATASET_IDon each one. So this sparked adding these simple cli sub-commands to deal with this issue if it happens for others.Features:
Please [X] all the boxes above that apply