Skip to content

Commit 42cd5d5

Browse files
prepare 0.15.1
1 parent ebaf9ae commit 42cd5d5

File tree

6 files changed

+50
-5
lines changed

6 files changed

+50
-5
lines changed

CHANGELOG.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ 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
19-
----
20-
yyyy-mm-dd (not yet released)
18+
0.15.1
19+
------
20+
2018-08-22
2121

22+
- More tests.
2223
- Fixes in docs.
2324

2425
0.15

docs/changelog.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ 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.15.1
19+
------
20+
2018-08-22
21+
22+
- More tests.
23+
- Fixes in docs.
24+
1825
0.15
1926
----
2027
2018-08-10

examples/simple/search_indexes/viewsets/publisher.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,14 @@ class PublisherDocumentViewSet(DocumentViewSet):
125125
'default_suggester': FUNCTIONAL_SUGGESTER_COMPLETION_PREFIX,
126126
# 'serializer_field': 'name',
127127
},
128+
'name_match_suggest': {
129+
'field': 'name',
130+
'suggesters': [
131+
FUNCTIONAL_SUGGESTER_COMPLETION_MATCH,
132+
],
133+
'default_suggester': FUNCTIONAL_SUGGESTER_COMPLETION_MATCH,
134+
# 'serializer_field': 'name',
135+
},
128136
'city_suggest': {
129137
'field': 'city.raw',
130138
'suggesters': [

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.15'
5+
version = '0.15.1'
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.15'
6+
__version__ = '0.15.1'
77
__author__ = 'Artur Barseghyan <[email protected]>'
88
__copyright__ = '2017-2018 Artur Barseghyan'
99
__license__ = 'GPL 2.0/LGPL 2.1'

src/django_elasticsearch_dsl_drf/tests/test_functional_suggesters.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ def setUpClass(cls):
8484
country='Burkina Faso',
8585
)
8686
)
87+
cls.publishers.append(
88+
factories.PublisherFactory(
89+
name='Strip Books of America',
90+
city='Chelmsford',
91+
state_province='South East',
92+
country='Burkina Faso',
93+
)
94+
)
8795
cls.publishers.append(
8896
factories.PublisherFactory(
8997
name='Book Works',
@@ -140,6 +148,17 @@ def setUpClass(cls):
140148
publisher__country='Armenia',
141149
)
142150
)
151+
cls.books.append(
152+
factories.BookFactory(
153+
title='Eeeee Ffff',
154+
summary='He took his vorpal sword in his hand,'
155+
'Long time the manxome foe he sought --'
156+
'So rested he by the Tumtum tree,'
157+
'And stood awhile in thought.',
158+
publisher__name='Strip Books of America',
159+
publisher__country='Burkina Faso',
160+
)
161+
)
143162

144163
cls.books += factories.BookFactory.create_batch(
145164
10,
@@ -223,6 +242,14 @@ def test_suggesters_completion(self):
223242
'Ad': ['Addison–Wesley', 'Adis International'],
224243
'Atl': ['Atlantic Books', 'Atlas Press'],
225244
'Boo': ['Book League of America', 'Book Works', 'Booktrope'],
245+
'Stri': ['Strip Books of America'],
246+
},
247+
'name_match_suggest__completion_match': {
248+
'Strip': ['Strip Books of America', ],
249+
'America': [
250+
'Strip Books of America',
251+
'Book League of America',
252+
],
226253
},
227254
'country_suggest__completion_prefix': {
228255
'Arm': ['Armenia'],
@@ -237,6 +264,8 @@ def test_suggesters_completion(self):
237264
test_data.update(
238265
{
239266
'name_suggest': test_data['name_suggest__completion_prefix'],
267+
'name_match_suggest':
268+
test_data['name_match_suggest__completion_match'],
240269
'country_suggest':
241270
test_data['country_suggest__completion_prefix'],
242271
}

0 commit comments

Comments
 (0)