reviewboard.search.indexes¶
-
class
BaseSearchIndex[source]¶ Bases:
haystack.indexes.SearchIndexBase class for a search index.
This sets up a few common fields we want all indexes to include.
-
local_site_attr= None[source]¶ 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.
-
prepare_local_sites(obj)[source]¶ 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
[0], indicating no local site.
-