Skip to content
Branch: master
Find file History
Latest commit 52f329e Nov 21, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
README.rst
alias_migration.py
completion.py Fix for python 2 Nov 21, 2018
composite_agg.py make all examples runnable Oct 10, 2018
parent_child.py
percolate.py

README.rst

Elasticsearch DSL Examples

In this directory you can see several complete examples demonstrating key concepts and patterns exposed by elasticsearch-dsl.

alias_migration.py

The alias migration example shows a useful pattern where we use versioned indices (test-blog-0, test-blog-1, ...) to manage schema changes and hides that behind an alias so that the application doesn't have to be aware of the versions and just refer to the test-blog alias for both read and write operations.

For simplicity we use a timestamp as version in the index name.

parent_child.py

More complex example highlighting the possible relationships available in elasticsearch - parent/child and nested.

composite_agg.py

A helper function using the composite aggregation to paginate over aggregation results.

percolate.py

A BlogPost document with automatic classification using the percolator functionality.

completion.py

As example using completion suggester to auto complete people's names.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.