class FakeSearch(search.ModelSearchAdapter): model = Fake fields = [ 'title^2', 'description', ] facets = { 'tag': search.TermFacet('tags'), 'other': search.TermFacet('other'), 'range': search.RangeFacet('a_num_field'), 'daterange': search.DateRangeFacet('a_daterange_field'), 'bool': search.BoolFacet('boolean'), 'extra': search.ExtrasFacet('extras'), } sorts = { 'title': search.Sort('title.raw'), 'description': search.Sort('description.raw'), }
def setUp(self): self.facet = search.DateRangeFacet('some_field')