- class BaseSearchIndex¶
Base class for a search index.
This sets up a few common fields we want all indexes to include.
- model = None¶
The model to index.
- local_site_attr = None¶
The local site attribute on the model.
For ForeignKeys, this should be the name of the ID field, as in ‘local_site_id’. For ManyToManyFields, it should be the standar field name.
Return the model for this index.
Prepare the list of local sites for the search index.
This will take any associated local sites on the object and store them in the index as a list. The search view can then easily look up values in the list, regardless of the type of object.
If the object is not a part of a local site, the list will be
, indicating no local site.