elasticsearch integration with plone
See the full documentation on readthedocs.
- Less than 5 minutes:
- Download & install Java
- Download & install Elastic Search
- Step by Step for Ubuntu:
- add-apt-repository ppa:webupd8team/java
- apt-get update
- apt-get install git curl oracle-java7-installer
- wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.0-linux-x86_64.tar.gz
- wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.0-linux-x86_64.tar.gz.sha512
- shasum -a 512 -c elasticsearch-7.6.0-linux-x86_64.tar.gz.sha512
- tar -xzf elasticsearch-7.6.0-linux-x86_64.tar.gz
- cd elasticsearch
- bin/elasticsearch &
- Does it work?
- curl http://localhost:9200/
- Do you see the Hudsucker Proxy reference? “You Know, for Search”
- Use Elastic Search in Plone:
- Add collective.elasticsearch to eggs & re-run buildout
- Restart Plone
- Goto Control Panel
- Add “Elastic Search” in Add-on Products
- Click “Elastic Search” in “Add-on Configuration”
- Click “Convert Catalog”
- Click “Rebuild Catalog”
You now have a insanely scalable modern search engine. Now live the life of the Mind!
This package aims to index all fields the portal_catalog indexes and allows you to delete the Title, Description and SearchableText indexes 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, Plone’s default catalog will be used. This is because Plone’s default catalog is faster on normal queries than using ElasticSearch.
Only tested with Plone 5 with Dexterity types.
It should also work with Plone 4.3 and archetypes.
Deployed with Elasticsearch 7.6.0
Support 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.
This package comes with Celery support where all indexing operations will be pushed into celery to be run asynchronously.
Please see instructions for collective.celery to see how this works.
Run elasticsearch for tests to utilize:
- docker run
- -e “discovery.type=single-node” -e “cluster.name=docker-cluster” -e “ES_JAVA_OPTS=-Xms512m -Xmx512m” -p 9200:9200 docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.0
Then, you can use one of the travis buildout test files:
virtualenv . bin/pip install -r requirements.txt bin/buildout bin/test
- Nathan Van Gheem, firstname.lastname@example.org
- BREAKING: Make changes for ES 7.x [bduncan137]
- Slow down tests to allow them to complete correctly [bduncan137]
- Issue#76 In 5.1+ we want to patch _unindexObject not unindexObject [ewohnlich]
- Explicit error logging added, if ES bulk action for indexing failed. [nazrulworld]
- Fix commit hook bug when content has been moved [instification]
- Issue#63 Now ensuring unicode value would for both python2 and python3 case. [nazrulworld]
- Now possible to search by other than Title, Description and SearchableText indexes. [nazrulworld]
- Add missing import logger [nazrulworld]
- Fix Zope DateTime convert to also handle the datetime.date type [ewohnlich]
- Fix sortable_title search issue [ewohnlich]
- Fix date queries to work with min:max as well as minmax [vangheem]
- Fix sort order parsing and implementation [vangheem]
- Handle upgrades with missing es_only_indexes properly [vangheem]
- Add IReindexActive to request as a flag for other code [lucid-0]
- Python 3 Support [vangheem]
- Support ES 6 [lucid-0]
- Fix error causing “Server Status” on @@elastic-controlpanel to be empty. [fulv]
- Prevent critical error when by chance query value is None. [thomasdesvenain]
- Minor code cleanup: readability, pep8, 80 cols, zca decorators. [jensens]
- Fix date criteria: ‘minmax’ instead of ‘min:max’ + string to date conversion [ebrehault]
- Gracefully handle upgrades in the settings interface so it doesn’t break for people upgrading. [vangheem]
- Running indexing as admin as it is possible to initiate reindex or index on an object that you do not have permissions for [vangheem]
- Add a method to set the body of the request during index creation. [Gagaro]
- Fixed get brain in lazy list with negative indexes. [thomasdesvenain]
- The list of indexes that forces es search is configurable. [thomasdesvenain]
- Works under Plone 4.3. [thomasdesvenain]
- Works with archetypes contents. [thomasdesvenain]
- 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. [thomasdesvenain]
- Prevent from unindex before reindex when uid is unchanged, for instance at rename. Use a set for to-remove list. [thomasdesvenain]
- Fix indexing when removing the Title and Description indexes from Plone [vangheem]
- upgrade to elasticsearch 2.x [vangheem]
- provide better search query [vangheem]
- make sure to get alias definition right [vangheem]
- create index as an alias so you can potentially work on an existing alias without needing downtime [vangheem]
- change default sorting to descending. Closes: https://github.com/collective/collective.elasticsearch/issues/12 [neilferreira]
- Initial release
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size collective.elasticsearch-4.0.0.tar.gz (49.4 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for collective.elasticsearch-4.0.0.tar.gz