You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you add a exclude_fields to class Elasticsearch to only exclude some fields?
I'm using abstract model. I have a lot of models have a uuid field (and other fields) which is useless for search. Its painfull to use fields to specify each model to exclude the uuid field.
My code like this:
classCommonAttr(models.Model):
create_date=models.DateTimeField(u"Create data", auto_now_add=True) # excludeuuid=models.CharField(u'UUID', max_length=36, unique=True) # excludeclassMeta:
abstract=TrueclassElasticsearch(EsIndexable.Elasticsearch):
exclude_fields= ['uuid', 'create_date'] # this is very usefull for abstract modelclassA(CommonAttr):
passclassB(CommonAttr):
pass
Can you add a exclude_fields to only exclude some fields?
Thank you very much.
The text was updated successfully, but these errors were encountered:
Can you add a
exclude_fields
to class Elasticsearch to only exclude some fields?I'm using abstract model. I have a lot of models have a
uuid
field (and other fields) which is useless for search. Its painfull to usefields
to specify each model to exclude the uuid field.My code like this:
Can you add a
exclude_fields
to only exclude some fields?Thank you very much.
The text was updated successfully, but these errors were encountered: