full text: do not overwrite SQLCatalog_makeFullTextQuery
This is for #20170620-8BDEBE.
@kazuhiko is that approach OK ?
To be honest, I don't like so much to hardcode the possible scripts names in SQLCatalog_makeFullTextQuery
like this, so we can discuss a better approach.
I considered the following approaches:
-
erp5_mysql_innodb
'sSQLCatalog_makeFullTextQuery
call a script fromportal_skins
and each full text business template can define a skin folder containing this script. I did not want to create skin folders just for this and it seems more logical to have this code inportal_catalog
thanportal_skins
; - Instead of using hardcoded scripts names,
SQLCatalog_makeFullTextQuery
calls the first script matchingSQLCatalog_make.*FullTextQuery
pattern, but this would be slow and we never use this approach anyway; - Have all implementions in
erp5_mysql_innodb
'sSQLCatalog_makeFullTextQuery
and let this script choose the best by introspecting catalog. Similar to what we do in SQLCatalog_makeTranslatedTitleQuery and SQLCatalog_makeSearchTextQuery (maybe this is better in fact).