Package: collective.elasticsearch
collective.elasticsearchIntroductionThis package aims to index all fields the portal_catalog indexes and allows you to delete theTitle,DescriptionandSearchableTextindexes which can provide significant improvement to performance and RAM usage.Then, ElasticSearch queries are ONLY used when Title, Description and SearchableText text are in the query. Otherwise, the plone's default catalog will be used. This is because Plone's default catalog is faster on normal queries than using ElasticSearch.Install Elastic SearchFor a comprehensive documentation about the different options of installing Elastic Search, please readtheir documentation.A quick start, using Docker would be:dockerrun\-e"discovery.type=single-node"\-e"cluster.name=docker-cluster"\-e"ES_JAVA_OPTS=-Xms512m -Xmx512m"\-p9200:9200\elasticsearch:7.7.0Test the installationRun, on your shell:curlhttp://localhost:9200/And you should see the Hudsucker Proxy reference? "You Know, for Search"Install collective.elasticsearchFirst, addcollective.elasticsearchto your package dependencies, or install it withpip(the same one used by your Plone installation):pipinstallcollective.elasticsearchRestart Plone, and go to theControl Panel, click inAdd-ons, and selectElastic Search.Now, go toAdd-on Configurationand:Check "Enable"Click "Convert Catalog"Click "Rebuild Catalog"You now have a insanely scalable modern search engine. Now live the life of the Mind!CompatibilityPython 3Plone 5.2 and aboveTested with Elastic Search 7.7.0StateSupport for all index column types is done EXCEPT for the DateRecurringIndex index column type. If you are doing a full text search along with a query that contains a DateRecurringIndex column, it will not work.Developing this packageCreate the virtual enviroment and install all dependencies:makebuildStart Plone in foreground:makestartRunning testsmaketestsFormatting the codebasemakeformatLinting the codebasemakelintLicenseThe project is licensed under the GPLv2.Changelog5.0.0 (2022-10-11)Renamemasterbranch tomain@ericofDrop support for Python 3.7 when using Plone 6.0 @ericofAdd support to plone.restapi and Volto @ericof5.0.0a2 (2022-09-23)Implement IIndexQueueProcessor support @ericofRefactor ElasticSearchCatalog methods into ElasticSearchManager object @ericofBreaking: Remove collective.elasticsearch.es @ericofBreaking: Remove collective.elasticsearch.hooks @ericofRefactor moveObjectsByDelta to reduce the number of calls to ElasticSearch @ericofReindex operations update on the catalog send only updated index to ElasticSearch @ericofRemove collective.celery support (as it is not Python-3 compatible yet) @ericof5.0.0a1 (2022-09-14)Refactor hook.index_batch to reduce the number of calls do Elastic Search @ericofImplement plone/code-analysis-action @ericofAdd support to Plone 6.0 @ericofSupport Python 3.7, 3.8, 3.9 and 3.10 @ericofDrop support to Plone versions 4.3, 5.0 and 5.1 @ericof, @andreclimacoDrop support to Python 2.7 @ericof, @andreclimaco4.0.0 (2021-04-28)BREAKING: Make changes for ES 7.x @bduncan137Slow down tests to allow them to complete correctly @bduncan1373.0.5 (2021-04-28)Issue #76In 5.1+ we want to patch _unindexObject not unindexObject @ewohnlichExplicit error logging added, if ES bulk action for indexing failed. @nazrulworldFix commit hook bug when content has been moved @instification3.0.4 (2019-08-21)Issue #63Now ensuring unicode value would for both python2 and python3 case. @nazrulworldNow possible to search by other thanTitle,DescriptionandSearchableTextindexes. @nazrulworld3.0.3 (2019-03-12)Add missing import logger @nazrulworld3.0.2 (2019-01-31)Fix Zope DateTime convert to also handle the datetime.date type @ewohnlich3.0.1 (2019-01-28)Fix sortable_title search issue @ewohnlich3.0.0 (2019-01-28)Fix date queries to work withmin:maxas well asminmax@vangheemFix sort order parsing and implementation @vangheemHandle upgrades with missinges_only_indexesproperly @vangheemAdd IReindexActive to request as a flag for other code @lucid-02.0.2 (2018-11-27)Python 3 Support @vangheemSupport ES 6 @lucid-0Fix error causing "Server Status" on @@elastic-controlpanel to be empty. @fulv2.0.1 (2018-01-05)Prevent critical error when by chance query value is None. @thomasdesvenainMinor code cleanup: readability, pep8, 80 cols, zca decorators. @jensensFix date criteria: 'minmax' instead of 'min:max' + string to date conversion @ebrehault2.0.0a6 (2017-03-29)Gracefully handle upgrades in the settings interface so it doesn't break for people upgrading. @vangheem2.0.0a5 (2017-03-29)Running indexing as admin as it is possible to initiate reindex or index on an object that you do not have permissions for @vangheem2.0.0a4 (2017-03-27)released2.0.0a3 (2017-03-27)Add a method to set the body of the request during index creation. @GagaroFixed get brain in lazy list with negative indexes. @thomasdesvenainThe list of indexes that forces es search is configurable. @thomasdesvenainWorks under Plone 4.3. @thomasdesvenainWorks with archetypes contents. @thomasdesvenain2.0.0a2 (2016-07-19)We can pass a custom results factory and custom query parameters to IElasticSearchCatalog.search() method. So we can use it as a public interface for custom needs. @thomasdesvenainPrevent from unindex before reindex when uid is unchanged, for instance at rename. Use a set for to-remove list. @thomasdesvenainFix indexing when removing the Title and Description indexes from Plone @vangheem2.0.0a1 (2016-06-06)upgrade to elasticsearch 2.x @vangheem1.0.1a4 (2016-05-22)provide better search query @vangheem1.0.1a3 (2016-03-22)make sure to get alias definition right @vangheem1.0.1a2 (2016-03-18)create index as an alias so you can potentially work on an existing alias without needing downtime @vangheem1.0.1a1 (2016-02-25)change default sorting to descending.Issue #12@neilferreira1.0.0a1 (2016-02-25)Initial release