collective / Products.PloneKeywordManager

Change, merge and delete keywords (AKA tags or subjects) in Plone.
https://pypi.org/project/Products.PloneKeywordManager/
4 stars 8 forks source link

Which is the best approach: have an IGNORE_INDEXES or an AVAILABLE_INDEXES in config.py? #22

Closed idgserpro closed 2 years ago

idgserpro commented 8 years ago

As of now, just installing Products.PloneKeywordManager in a plone 4.3.9 instance we have two Keyword Fields: "Subject" and "commentators".

selecao_184

The way the logic is made right now with the tool it's using an IGNORE_INDEXES, so "commentators" should be added to it as well since it's not exactly a keyword we're going to edit or merge on a particular website.

So, if in a future version of Plone another index is added, this constant will need to be upgraded again.

We were thinking, wouldn't it be a better approach to have an AVAILABLE_INDEXES that would have only Subject - and if an specific policy would like to use this plugin to manage other KeywordIndexes, you could just patch it, instead of the implementation we have today? The real bonus would be to change this constant to a registry.xml configuration so tou don't even need a patch :)