File: README.rst

package info (click to toggle)
python-elasticsearch 9.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 22,728 kB
  • sloc: python: 104,053; makefile: 151; javascript: 75
file content (47 lines) | stat: -rw-r--r-- 1,624 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
<https://www.elastic.co/guide/en/elasticsearch/reference/6.3/nested.html>`_ and
`nested
<https://www.elastic.co/guide/en/elasticsearch/reference/6.3/nested.html>`_.

``composite_agg.py``
--------------------

A helper function using the `composite aggregation
<https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-composite-aggregation.html>`_
to paginate over aggregation results.

``percolate.py``
----------------

A ``BlogPost`` document with automatic classification using the `percolator
<https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-percolate-query.html>`_
functionality.

``completion.py``
-----------------

As example using `completion suggester
<https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters-completion.html>`_
to auto complete people's names.