Python wagtail.search.index.Indexed() Examples
The following are 2
code examples of wagtail.search.index.Indexed().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
wagtail.search.index
, or try the search function
.
Example #1
Source File: test_indexed_class.py From wagtail with BSD 3-Clause "New" or "Revised" License | 5 votes |
def make_dummy_type(self, search_fields): return type(str('DummyType'), (index.Indexed, ), dict(search_fields=search_fields))
Example #2
Source File: utils.py From wagtail with BSD 3-Clause "New" or "Revised" License | 5 votes |
def get_boosts(): boosts = set() for model in apps.get_models(): if issubclass(model, Indexed): for search_field in get_search_fields(model.get_search_fields()): boost = search_field.boost if boost is not None: boosts.add(boost) return boosts