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
SearchFilterBackend
andCompoundSearchFilterBackend
. Update your code
accordingly. - Take meta property
using
of the documentMeta
into 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
BaseSearchFilterBackend
class. - 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).
Therst2pdf
package (which does not support Python 3) has been replaced
withrinohtype
package (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
SimpleQueryStringSearchFilterBackend
backend has been implemented. - Minor fixes in the
MultiMatchSearchFilterBackend
backend.
0.12-2018-07-21
- New-style Search Filter Backends. Old style
SearchFilterBackend
is
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
,
DjangoModelPermissionsOrAnonReadOnly
andDjangoObjectPermissions
).
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_distance
ordering 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_VALUE
has been removed. Use
SEPARATOR_LOOKUP_COMPLEX_VALUE
and
SEPARATOR_LOOKUP_COMPLEX_MULTIPLE_VALUE
instead.SEPARATOR_LOOKUP_NAME
has been added.- The method
split_lookup_complex_value
has been removed. Use
split_lookup_complex_value
instead. - 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
defaultterms
filter was used. Theterm
lookup 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
views
module. Import fromviewsets
instead. - Removed undocumented
get_count
helper fromhelpers
module.
0.10-2018-07-06
- Elasticsearch 6.x support.
- Minor fixes.