-
-
Notifications
You must be signed in to change notification settings - Fork 57
Description
https://github.com/plone/plone.api/blob/2.5.1/src/plone/api/content.py#L706 This section attempts to validate the query by making sure at least one ZCatalog index is present. However, some implementations remove the ZCatalog index in cases where querying on that index is only meant to be sent to a third party service like Elasticsearch. For example, wildcard.hps sends portal.portal_catalog(SearchableText="foo") to ES and encourages you to remove the SearchableText index from the ZCatalog as it would only take up space and increase index time.
But if that index is removed, api.content.find(SearchableText="foo") always returns an empty list.
What is the best solution here? Maybe an environment variable that can be set to skip the validate indexes step? Personally I do not see the benefit in the validation here in any case. If I call api.content.find() I would expect to get all content on the site, just as if I called portal.portal_catalog().