Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: override the indices entrypoint #84

Open
nharraud opened this issue Sep 23, 2016 · 6 comments
Open

RFC: override the indices entrypoint #84

nharraud opened this issue Sep 23, 2016 · 6 comments

Comments

@nharraud
Copy link
Member

Problem:
As soon as one uses Invenio-search all indices registered in the entrypoint will be added to elasticsearch. The problem is that some services don't want the ones provided by default. The only way to override the entrypoint name is by not using invenio-base as it is given directly to the extension.

Who has this problem:

Suggested solution:
Move the entrypoint name to the configuration.

Timeline:
This is not urgent but might be problematic if two mappings conflict (one from invenio and another from the overlay) after an upgrade.

@nharraud nharraud added this to the v1.0.0 milestone Sep 23, 2016
@jirikuncar
Copy link
Member

@nharraud which default mappings would you like to remove?

@nharraud
Copy link
Member Author

nharraud commented Sep 23, 2016

@jirikuncar In B2Share case, all of them. We only use marc21 for exports, not internally. Especially the "deposits" mapping which prevent us from using the same name.

@nharraud
Copy link
Member Author

nharraud commented Sep 23, 2016

Or at least we don't use marc21 internally for now. If we use the authority module later it will make sense to use it then. For other records we will keep our own format.

@jirikuncar
Copy link
Member

Can you remove them manually from mappings and aliases (

self.mappings = {}
self.aliases = {}
) until we find some good solution.

Posible solutions for discussion:

  1. Move the entrypoint name to the configuration. (by @nharraud)
  2. Don't install package entrypoints but let overlays to add them to their setup.py.
  3. Add configurable blacklist.
  4. TBD

@nharraud
Copy link
Member Author

Another solution I am using in the mean time is to index directly in the index and not the alias. Then I avoid the elasticsearch error complaining about multiple indices per alias. The search will still work the same way.
This doesn't remove the unused indices and aliases but it makes it a minor issue.

The blacklist issue is that new indices might still pop up when a module is updated.

@jirikuncar
Copy link
Member

The blacklist issue is that new indices might still pop up when a module is updated.

--dry-run could help ... (probably not implemented yet)

@lnielsen lnielsen modified the milestones: v1.0.0, someday May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants