Releases: barseghyanartur/django-elasticsearch-dsl-drf
Releases · barseghyanartur/django-elasticsearch-dsl-drf
0.16-2018-09-10
.. note:
This release contains minor backwards incompatible changes. You might
need to update your code if you have been making use of nested search.
Old way of declaring nested search fields
.. code-block:: python
search_nested_fields = {
'country': ['name'],
'country.city': ['name'],
}
New way of declaring nested search fields
.. code-block:: python
search_nested_fields = {
'country': {
'path': 'country',
'fields': ['name'],
},
'city': {
'path': 'country.city',
'fields': ['name'],
},
}
- Changes in nested search. This affects usage of both historical
SearchFilterBackendandCompoundSearchFilterBackend. Update your code
accordingly. - Take meta property
usingof the documentMetainto consideration.
0.15.1-2018-08-22
- More tests.
- Fixes in docs.
0.15-2018-08-10
- Global aggregations.
0.14-2018-08-06
- More like this support through detail action.
0.13.2-2018-08-03
- Successfully tested against Python 3.7 and Django 2.1.
- Unified the base
BaseSearchFilterBackendclass. - Minor clean up and fixes in docs.
- Upgrading test suite to modern versions (
pytest,tox,
factory_boy,Faker). Removing unused dependencies from
requirements (drf-extensions). - Fixed missing PDF generation in offline documentation (non ReadTheDocs).
Therst2pdfpackage (which does not support Python 3) has been replaced
withrinohtypepackage (which does support Python 3).
0.13.1-2018-07-26
- Minor fix in suggesters on Elasticsearch 6.x.
0.13-2018-07-23
.. note::
Release dedicated to Guido van Rossum, the former Python BDFL, who
resigned from his BDFL position recently. Guido knew it better than we all
do. His charisma, talent and leadership will be certainly missed a lot by
the community. Thumbs up again for the best BDFL ever.
- The
SimpleQueryStringSearchFilterBackendbackend has been implemented. - Minor fixes in the
MultiMatchSearchFilterBackendbackend.
0.12-2018-07-21
- New-style Search Filter Backends. Old style
SearchFilterBackendis
still supported (until at least version 0.16), but is deprecated. Migrate to
CompoundSearchFilterBackend.MultiMatchSearchFilterBackend
introduced (the name speaks for itself). - From now on, your views would also work with model- and object-level
permissions of the Django REST Framework (such asDjangoModelPermissions,
DjangoModelPermissionsOrAnonReadOnlyandDjangoObjectPermissions).
Correspondent model or object would be used for that. If you find it
incorrect in your case, write custom permissions and declare the explicitly
in your view-sets. - Fixed geo-spatial
geo_distanceordering for Elastic 5.x. and 6.x. - Fixes occasionally failing tests.
0.11-2018-07-15
2018-07-15
.. note::
This release contains backwards incompatible changes.
You should update your Django code and front-end parts of your applications
that were relying on the complex queries using `|` and `:` chars in the
GET params.
.. note::
If you have used custom filter backends using `SEPARATOR_LOOKUP_VALUE`
`SEPARATOR_LOOKUP_COMPLEX_VALUE` or
`SEPARATOR_LOOKUP_COMPLEX_MULTIPLE_VALUE` constants or
`split_lookup_complex_value` helper method of the `FilterBackendMixin`,
you most likely want to run your functional tests to see if everything
still works.
.. note::
Do not keep things as they were in your own fork, since new search backends
will use the `|` and `:` symbols differently.
Examples of old API requests vs new API requests
.. note::
Note, that `|` and `:` chars were mostly replaced with `__` and `,`.
Old API requests
.. code-block:: text
http://127.0.0.1:8080/search/publisher/?search=name|reilly&search=city|london
http://127.0.0.1:8000/search/publishers/?location__geo_distance=100000km|12.04|-63.93
http://localhost:8000/api/articles/?id__terms=1|2|3
http://localhost:8000/api/users/?age__range=16|67|2.0
http://localhost:8000/api/articles/?id__in=1|2|3
http://localhost:8000/api/articles/?location__geo_polygon=40,-70|30,-80|20,-90|_name:myname|validation_method:IGNORE_MALFORMED
New API requests
.. code-block:: text
http://127.0.0.1:8080/search/publisher/?search=name:reilly&search=city:london
http://127.0.0.1:8000/search/publishers/?location__geo_distance=100000km__12.04__-63.93
http://localhost:8000/api/articles/?id__terms=1__2__3
http://localhost:8000/api/users/?age__range=16__67__2.0
http://localhost:8000/api/articles/?id__in=1__2__3
http://localhost:8000/api/articles/?location__geo_polygon=40,-70__30,-80__20,-90___name,myname__validation_method,IGNORE_MALFORMED
SEPARATOR_LOOKUP_VALUEhas been removed. Use
SEPARATOR_LOOKUP_COMPLEX_VALUEand
SEPARATOR_LOOKUP_COMPLEX_MULTIPLE_VALUEinstead.SEPARATOR_LOOKUP_NAMEhas been added.- The method
split_lookup_complex_valuehas been removed. Use
split_lookup_complex_valueinstead. - Default filter lookup option is added. In past, if no specific lookup was
provided and there were multiple values for a single field to filter on, by
defaulttermsfilter was used. Thetermlookup was used by default
in similar situation for a single value to filter on. It's now possible to
declare default lookup which will be used when no lookup is given. - Removed deprecated
viewsmodule. Import fromviewsetsinstead. - Removed undocumented
get_counthelper fromhelpersmodule.
0.10-2018-07-06
- Elasticsearch 6.x support.
- Minor fixes.