equal
deleted
inserted
replaced
85 return itree.path()[:-1] |
85 return itree.path()[:-1] |
86 return () |
86 return () |
87 |
87 |
88 |
88 |
89 class IFTIndexableAdapter(view.EntityAdapter): |
89 class IFTIndexableAdapter(view.EntityAdapter): |
|
90 """standard adapter to handle fulltext indexing |
|
91 |
|
92 .. automethod:: cubicweb.entities.adapters.IFTIndexableAdapter.fti_containers |
|
93 .. automethod:: cubicweb.entities.adapters.IFTIndexableAdapter.get_words |
|
94 """ |
90 __regid__ = 'IFTIndexable' |
95 __regid__ = 'IFTIndexable' |
91 __select__ = is_instance('Any') |
96 __select__ = is_instance('Any') |
92 |
97 |
93 def fti_containers(self, _done=None): |
98 def fti_containers(self, _done=None): |
|
99 """return the list of entities to index when handling ``self.entity`` |
|
100 |
|
101 The actual list of entities depends on ``fulltext_container`` usage |
|
102 in the datamodel definition |
|
103 """ |
94 if _done is None: |
104 if _done is None: |
95 _done = set() |
105 _done = set() |
96 entity = self.entity |
106 entity = self.entity |
97 _done.add(entity.eid) |
107 _done.add(entity.eid) |
98 containers = tuple(entity.e_schema.fulltext_containers()) |
108 containers = tuple(entity.e_schema.fulltext_containers()) |