Commit 18873e59 authored by Nicolas Wavrant's avatar Nicolas Wavrant

Remove properties acquired from relations from the searchable text properties

Also add a comment in getSearchableText to explain why
parent 42314ec5
...@@ -82,8 +82,6 @@ ...@@ -82,8 +82,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -85,8 +85,6 @@ ...@@ -85,8 +85,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -83,8 +83,6 @@ ...@@ -83,8 +83,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -82,8 +82,6 @@ ...@@ -82,8 +82,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -84,8 +84,6 @@ ...@@ -84,8 +84,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -88,8 +88,6 @@ ...@@ -88,8 +88,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -95,7 +95,6 @@ ...@@ -95,7 +95,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -61,8 +61,6 @@ ...@@ -61,8 +61,6 @@
<string>reference</string> <string>reference</string>
<string>source_reference</string> <string>source_reference</string>
<string>destination_reference</string> <string>destination_reference</string>
<string>source_section_title</string>
<string>destination_section_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
<string>description</string> <string>description</string>
<string>reference</string> <string>reference</string>
<string>short_title</string> <string>short_title</string>
<string>source_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -85,7 +85,6 @@ ...@@ -85,7 +85,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -93,7 +93,6 @@ ...@@ -93,7 +93,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -94,7 +94,6 @@ ...@@ -94,7 +94,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -92,7 +92,6 @@ ...@@ -92,7 +92,6 @@
<string>short_title</string> <string>short_title</string>
<string>subject_list</string> <string>subject_list</string>
<string>filename</string> <string>filename</string>
<string>source_project_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -3102,6 +3102,12 @@ class Base( CopyContainer, ...@@ -3102,6 +3102,12 @@ class Base( CopyContainer,
# generated from properties methods and add explicitly defined method_ids as well # generated from properties methods and add explicitly defined method_ids as well
for searchable_text_property_id in portal_type.getSearchableTextPropertyIdList(): for searchable_text_property_id in portal_type.getSearchableTextPropertyIdList():
# this "hasProperty" prevents acquisition. But also it prevents retrieving properties
# of relations (ie: source_section_title). This is not bad, as anyway if the property
# of the relation changes, the indexed searchableText property will become wrong.
# Also, we don't want to trigger the indexation of hundreds of documents if the
# title of a Person changes (which means we don't want an interaction workflow
# for reindexation of related documents)
if self.hasProperty(searchable_text_property_id): if self.hasProperty(searchable_text_property_id):
method_id = convertToUpperCase(searchable_text_property_id) method_id = convertToUpperCase(searchable_text_property_id)
searchable_text_method_id_list.extend(['get%s' %method_id]) searchable_text_method_id_list.extend(['get%s' %method_id])
......
  • I remember adding destination_section_title on accounting transactions, thinking it may be useful to find all invoices from "customer XXX" when searching for "customer XXX", but you are right, it was a bad idea 👍

Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment