0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-29 17:36:49 +01:00
wagtail/docs/topics/search
Tim Heap 6bd168580e Change Indexed.search_fields to be a listish thing
Indexed.search_fields used to be a tuple. This is incorrect, and it
should have been a list.  Changing it to be a list now would be a
backwards incompatible change, as people do

    search_fields = Page.search_fields + (
        SearchField('body')
    )

Adding a tuple to the end of a list causes an error, so this would
cause all old code that used tuples to throw an error. This is not
great.

A new ThisShouldBeAList class, which subclasses list, has been added.
It additionally allows tuples to be added to it, as in the above
behaviour, but will raise a deprecation warning if someone does this.
Old code that uses tuples will continue to work, but raise a deprecation
warning.

See #2310
2016-03-24 21:05:09 +00:00
..
backends.rst Searchly no longer supports Elasticsearch 1.x, so I switched the suggested development service to Bonsai. 2016-03-10 15:11:42 +00:00
index.rst Various typo fixes and grammar/clarity improvements. 2016-03-10 15:11:41 +00:00
indexing.rst Change Indexed.search_fields to be a listish thing 2016-03-24 21:05:09 +00:00
searching.rst Various typo fixes and grammar/clarity improvements. 2016-03-10 15:11:41 +00:00