Skip to content

Commit bed3d20

Browse files
prepare 0.16.3
1 parent 7107c96 commit bed3d20

File tree

11 files changed

+57
-4
lines changed

11 files changed

+57
-4
lines changed

CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,18 @@ are used for versioning (schema follows below):
1515
0.3.4 to 0.4).
1616
- All backwards incompatible changes are mentioned in this document.
1717

18+
0.16.3
19+
------
20+
2018-10-31
21+
22+
.. note::
23+
24+
Release dedicated to Charles Aznavour.
25+
26+
- Make it possible to ignore certain Elastic exceptions by providing the
27+
appropriate ``ignore`` argument (on the view level). Default behaviour is
28+
intact. Set it to a list of integers (error codes) if you need it so.
29+
1830
0.16.2
1931
------
2032
2018-09-21

docs/documentation.rst.distrib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Contents:
1818
nested_fields_usage_examples
1919
more_like_this
2020
global_aggregations
21-
demo
21+
configuration_tweaks
2222
changelog
2323
django_elasticsearch_dsl_drf
2424

docs_src/configuration_tweaks.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
====================
2+
Configuration tweaks
3+
====================
4+
Ignore certain Elasticsearch exceptions
5+
---------------------------------------
6+
.. code-block:: python
7+
8+
class BookIgnoreIndexErrorsDocumentViewSet(DocumentViewSet):
9+
10+
# ...
11+
ignore = [404]
12+
# ...

examples/simple/search_indexes/urls.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
BookDefaultFilterLookupDocumentViewSet,
99
BookDocumentViewSet,
1010
BookFunctionalSuggesterDocumentViewSet,
11+
BookIgnoreIndexErrorsDocumentViewSet,
1112
BookMoreLikeThisDocumentViewSet,
1213
BookMoreLikeThisNoOptionsDocumentViewSet,
1314
BookMultiMatchSearchFilterBackendDocumentViewSet,
@@ -64,6 +65,13 @@
6465
base_name='bookdocument_functional_suggester'
6566
)
6667

68+
69+
books_ignore_index_errors = router.register(
70+
r'books-ignore-index-errors',
71+
BookIgnoreIndexErrorsDocumentViewSet,
72+
base_name='bookdocument_ignore_index_errors'
73+
)
74+
6775
books_more_like_this = router.register(
6876
r'books-more-like-this',
6977
BookMoreLikeThisDocumentViewSet,

examples/simple/search_indexes/viewsets/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
BookDefaultFilterLookupDocumentViewSet,
77
BookDocumentViewSet,
88
BookFunctionalSuggesterDocumentViewSet,
9+
BookIgnoreIndexErrorsDocumentViewSet,
910
BookMoreLikeThisDocumentViewSet,
1011
BookMoreLikeThisNoOptionsDocumentViewSet,
1112
BookMultiMatchSearchFilterBackendDocumentViewSet,
@@ -26,6 +27,7 @@
2627
'BookDefaultFilterLookupDocumentViewSet',
2728
'BookDocumentViewSet',
2829
'BookFunctionalSuggesterDocumentViewSet',
30+
'BookIgnoreIndexErrorsDocumentViewSet',
2931
'BookMoreLikeThisDocumentViewSet',
3032
'BookMoreLikeThisNoOptionsDocumentViewSet',
3133
'BookMultiMatchSearchFilterBackendDocumentViewSet',

examples/simple/search_indexes/viewsets/book/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from .default import BookDocumentViewSet
77
from .default_filter_lookup import BookDefaultFilterLookupDocumentViewSet
88
from .functional_suggester import BookFunctionalSuggesterDocumentViewSet
9+
from .ignore_index_errors import BookIgnoreIndexErrorsDocumentViewSet
910
from .more_like_this import (
1011
BookMoreLikeThisDocumentViewSet,
1112
BookMoreLikeThisNoOptionsDocumentViewSet,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from .default import BookDocumentViewSet
2+
3+
__all__ = (
4+
'BookIgnoreIndexErrorsDocumentViewSet',
5+
)
6+
7+
8+
class BookIgnoreIndexErrorsDocumentViewSet(BookDocumentViewSet):
9+
"""Book document view set based on compound search backend."""
10+
11+
ignore = [404]

scripts/prepare_docs.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ cat docs_src/advanced_usage_examples.rst > docs/advanced_usage_examples.rst
99
cat docs_src/nested_fields_usage_examples.rst > docs/nested_fields_usage_examples.rst
1010
cat docs_src/filtering_usage_examples.rst > docs/filtering_usage_examples.rst
1111
cat docs_src/more_like_this.rst > docs/more_like_this.rst
12+
cat docs_src/configuration_tweaks.rst > docs/configuration_tweaks.rst
1213
cat docs_src/global_aggregations.rst > docs/global_aggregations.rst

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from setuptools import find_packages, setup
44

5-
version = '0.16.2'
5+
version = '0.16.3'
66

77
DOCS_TRANSFORMATIONS = (
88
(

src/django_elasticsearch_dsl_drf/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"""
44

55
__title__ = 'django-elasticsearch-dsl-drf'
6-
__version__ = '0.16.2'
6+
__version__ = '0.16.3'
77
__author__ = 'Artur Barseghyan <[email protected]>'
88
__copyright__ = '2017-2018 Artur Barseghyan'
99
__license__ = 'GPL 2.0/LGPL 2.1'

0 commit comments

Comments
 (0)