apps.search.documents module¶
-
class
apps.search.documents.
Item
(meta=None, **kwargs)¶ Bases:
elasticsearch_dsl.document.Document
Item, as indexed by Elasticsearch
-
static
create
(model, using=None, index=None)¶ Factory method. Creates an Elasticsearch document from a Django Model. In other words, it converts an instance of
apps.api.models.Item
into an instance ofapps.search.documents.Item
.- Parameters
model –
apps.api.models.Item
object to convert from.using –
elasticsearch.Elasticsearch
connection to use.index – Name of the index corresponding to the
apps.search.documents.Item
object to be created.
- Returns
New Elasticsearch document corresponding to
model
.- Return type
-
static