diff --git a/cubicweb_elasticsearch/entities.py b/cubicweb_elasticsearch/entities.py index 7859ebfada15e37e77404b2efbe4f10283815944_Y3ViaWN3ZWJfZWxhc3RpY3NlYXJjaC9lbnRpdGllcy5weQ==..de231ccbbcf3c976002f45fea1341a20c5a6f5eb_Y3ViaWN3ZWJfZWxhc3RpY3NlYXJjaC9lbnRpdGllcy5weQ== 100644 --- a/cubicweb_elasticsearch/entities.py +++ b/cubicweb_elasticsearch/entities.py @@ -109,6 +109,12 @@ attrs.extend(self.custom_indexable_attributes) return attrs + def process_attributes(self): + data = {} + for attr in self.fulltext_indexable_attributes: + data[attr] = getattr(self.entity, attr) + return data + def serialize(self, complete=True): entity = self.entity if complete: @@ -118,6 +124,4 @@ 'eid': entity.eid, 'cwuri': entity.cwuri, } - for attr in self.fulltext_indexable_attributes: - data[attr] = getattr(entity, attr) # TODO take a look at what's in entity.cw_relation_cache @@ -123,4 +127,5 @@ # TODO take a look at what's in entity.cw_relation_cache + data.update(self.process_attributes()) return data