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

name choice for xyz_ATTR constants #42

Open
fulv opened this issue Aug 1, 2018 · 0 comments
Open

name choice for xyz_ATTR constants #42

fulv opened this issue Aug 1, 2018 · 0 comments
Labels

Comments

@fulv
Copy link
Member

fulv commented Aug 1, 2018

I was wondering why the names for the three customization constants were chosen to have a leading underscore:

https://github.com/collective/collective.elasticsearch/blob/master/collective/elasticsearch/es.py#L27

CONVERTED_ATTR = '_elasticconverted'
CUSTOM_INDEX_NAME_ATTR = '_elasticcustomindex'
INDEX_VERSION_ATTR = '_elasticindexversion'

The result of this choice is that they can not be set via the ZMI in the portal_catalog/manage_propertiesForm, because you will get an "invalid name" error. I understand that they can be set via code, as described here.
My use case is a set of several distinct Zope instances connected to a single ES cluster. So each instance needs to have its own index name, and it would be necessary to be able to configure these names TTW.

I have added a few fields to this purpose in interfaces.py, but it would have been easier via ZMI.

@fulv fulv added the question label Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant