tl;dr: This is a big rewrite with huge API-breaking changes. This replaces the old model-type system with the new MappingType system. This adds a degree of separation between models (traditionally stored in a db) and documents (stored in ElasticSearch). Untyped S works just like in v0.4 with the exception that if you don't specify values_dict or values_list, you now get back a list of DefaultMappingType which are slightly more useful than dicts. You can now create an S typed by a MappingType which makes it easier to specify the index and doctype, but also allows you to tie business logic to search results and also tie that back to db objects in a lazy-loading way. For example, say you had a description field and wanted to have a truncated version of it:: class MyMappingType(MappingType): def description_truncated(self): return self.description[:100] res = list(S(MyMappingType).query(description__text='stormy night')) print res.description_truncated() Also, inextricably linked with this commit is a minor rewrite of the test suite. They should run faster now, are better organized, and should be easier to write in the future. test_django.py doesn't look like it was written by a shrewdness of apes any more. Also fixed a bug where `fields` was affected by ``values_list`` and ``values_dict`` calls---the two need to be separated.
This reworks facets so that the API is cleaner and easier to use. It now has a .facet() which acts as a shorthand but doesn't do things you might not expect and it has a .facet_raw() which yields unto you the full expressive power of the ES facet. This adds some more tests and documentation and updates the CHANGELOG, too.
This release covers everything we've done so far before we start making some bigger changes. I also changed the author information to me representing that Dave has passed the torch for project maintenance to me. Also included some of jezdez's changes to project scaffolding files. Thank you!