Переглянути джерело

Update release notes with search changes

master
David Winterbottom 12 роки тому
джерело
коміт
0bb1b2de20
2 змінених файлів з 61 додано та 11 видалено
  1. 29
    4
      docs/source/ref/settings.rst
  2. 32
    7
      docs/source/releases/v0.6.rst

+ 29
- 4
docs/source/ref/settings.rst Переглянути файл

@@ -59,13 +59,38 @@ Default: 20
59 59
 
60 60
 The number of products to paginate by.
61 61
 
62
-``OSCAR_SEARCH_SUGGEST_LIMIT``
62
+``OSCAR_SEARCH_FACETS``
63 63
 ------------------------------
64 64
 
65
-Default: 10
65
+A dictionary that specifies the facets to use with the search backend.  It
66
+needs to be a dict with keys ``fields`` and ``queries`` for field- and
67
+query-type facets.  The default is::
68
+
69
+    OSCAR_SEARCH_FACETS = {
70
+        'fields': {
71
+            # The key for these dicts will be used when passing facet data
72
+            # to the template. Same for the 'queries' dict below.
73
+            'category': {
74
+                'name': _('Category'),
75
+                'field': 'category'
76
+            }
77
+        },
78
+        'queries': {
79
+            'price_range': {
80
+                'name': _('Price range'),
81
+                'field': 'price',
82
+                'queries': [
83
+                    # This is a list of (name, query) tuples where the name will
84
+                    # be displayed on the front-end.
85
+                    (_('0 to 40'), '[0 TO 20]'),
86
+                    (_('20 to 40'), '[20 TO 40]'),
87
+                    (_('40 to 60'), '[40 TO 60]'),
88
+                    (_('60+'), '[60 TO *]'),
89
+                ]
90
+            }
91
+        }
92
+    }
66 93
 
67
-The number of suggestions that the search 'suggest' function should return
68
-at maximum.
69 94
 
70 95
 ``OSCAR_PROMOTION_POSITIONS``
71 96
 -----------------------------

+ 32
- 7
docs/source/releases/v0.6.rst Переглянути файл

@@ -7,10 +7,12 @@ Welcome to Oscar 0.6!
7 7
 These release notes cover the `new features`_ as well as `backwards incompatible changes`_ 
8 8
 that you'll want to be aware of when upgrading from Oscar 0.5 or
9 9
 earlier.  This release contains some major changes to core APIs which means
10
-many old APIs are to be dropped - see the `deprecation plan`_.
10
+many old APIs are to be dropped - see the `deprecation plan`_ to avoid any
11
+nasty surprises.
11 12
 
12 13
 To upgrade your Oscar site, make sure you study both the `backwards incompatible changes`_ 
13
-and the `deprecated features`_
14
+and the `deprecated features`_.  If you have any undocumented issues, please
15
+let us know on the mailing list.
14 16
 
15 17
 .. _`new features`: `What's new in Oscar 0.6?`_
16 18
 .. _`upgrading advice`: `Upgrading notes`_
@@ -27,10 +29,10 @@ charge is largely backwards compatible with the old system of "partner
27 29
 wrappers" but it is recommended to upgrade to the new system.  Support for
28 30
 partner wrappers will be removed for Oscar 0.7.
29 31
 
30
-Oscar 0.6 also introduces better support for marketplaces with the so-called
31
-permission-based dashboard. It is now possible to give non-staff users access
32
-to a subset of the dashboard's views (products and orders) by setting the
33
-new ``dashboard_access`` permission.
32
+Oscar 0.6 also introduces better support for marketplace-like functionality
33
+with the so-called permission-based dashboard. It is now possible to give
34
+non-staff users access to a subset of the dashboard's views (products and
35
+orders) by setting the new ``dashboard_access`` permission.
34 36
 
35 37
 `Oscar now supports Django 1.5`_ and its custom user model.  This has been only
36 38
 tested in the context of starting a new Oscar project with a custom model.
@@ -48,7 +50,9 @@ Other notable new features include:
48 50
 
49 51
 * `Customer wishlists`_
50 52
 
51
-* `New helper methods`_ in the ``EventHandler`` class for order processing
53
+* `New helper methods`_ in the ``EventHandler`` class for order processing.
54
+
55
+* `Reworked seach app`_ with support for easy faceting.
52 56
 
53 57
 .. _`Oscar now supports Django 1.5`: `Django 1.5 and custom user model support`_
54 58
 .. _`Partners can now have addresses`: `Partner addresses`_
@@ -228,6 +232,16 @@ customers. They can be used to created curated collections of products.
228 232
 The core :class:`~oscar.apps.offer.models.Range` model has been extended with a
229 233
 HTML description field also.
230 234
 
235
+Reworked search app
236
+~~~~~~~~~~~~~~~~~~~
237
+
238
+Oscar's search app has been reviewed and simplified.  The main view class has
239
+been reworked to provide better support for faceting, which can be easily
240
+specified using the ``OSCAR_SEARCH_FACETS`` setting.
241
+
242
+The ``SuggestionsView`` has been removed as it wasn't being used.  A later
243
+version of Oscar will include a replacement.
244
+
231 245
 Order processing changes
232 246
 ~~~~~~~~~~~~~~~~~~~~~~~~
233 247
 
@@ -334,6 +348,17 @@ Address model changes
334 348
 * The ``Country`` model's `is_highlighted` column is now an integer field to allow
335 349
   fine-grained country selection. 
336 350
 
351
+Search app changes
352
+~~~~~~~~~~~~~~~~~~
353
+
354
+Some of the names have been simplified.
355
+
356
+* The ``MultiFacetedSearchView`` and ``SuggestionsView`` view classes have been
357
+  removed.  The ``MultiFacetedSeachView`` class is replaced by ``FacetedSearchView``.
358
+
359
+* The ``MultiFacetedSearchForm`` has been removed in favour of
360
+  ``SearchForm``.
361
+
337 362
 Renamed templates
338 363
 ~~~~~~~~~~~~~~~~~
339 364
 

Завантаження…
Відмінити
Зберегти