adding @update-catalog endpoint #1182
Open
+30
−1
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.
This goes in conjunction with this:
plone/guillotina_elasticsearch#105
With ES nowadays, if we want to index new fields using
index_field
the only way to update the mappings and settings of the index using the API of guillotina is to do a POST to @ catalog, which deletes the whole index, and creates it again. Then we need to reindex all the data calling POST @catalog-reindex. With this change, (regarding ES) when adding new index fields we can just call @update-catalog and delegate the logic (if necessary) to the catalog utility.