Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Gambier
erp5
Commits
a6ae33a5
Commit
a6ae33a5
authored
Oct 13, 2014
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert merge from branch tristan
This reverts commit
8e3de227
.
parent
7aafa7d0
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
35 additions
and
482 deletions
+35
-482
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeDescriptionFullTextQuery.catalog_keys.xml
.../SQLCatalog_makeDescriptionFullTextQuery.catalog_keys.xml
+0
-2
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeDescriptionFullTextQuery.xml
..._mysql_innodb/SQLCatalog_makeDescriptionFullTextQuery.xml
+0
-73
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml
...atalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml
+5
-2
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeTitleFullTextQuery.catalog_keys.xml
...innodb/SQLCatalog_makeTitleFullTextQuery.catalog_keys.xml
+0
-2
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeTitleFullTextQuery.xml
...g/erp5_mysql_innodb/SQLCatalog_makeTitleFullTextQuery.xml
+0
-73
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_catalog_fulltext.catalog_keys.xml
...p5_mysql_innodb/z0_drop_catalog_fulltext.catalog_keys.xml
+0
-5
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_catalog_fulltext.xml
...al_catalog/erp5_mysql_innodb/z0_drop_catalog_fulltext.xml
+0
-70
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_uncatalog_catalog_fulltext.catalog_keys.xml
...sql_innodb/z0_uncatalog_catalog_fulltext.catalog_keys.xml
+0
-5
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_uncatalog_catalog_fulltext.xml
...talog/erp5_mysql_innodb/z0_uncatalog_catalog_fulltext.xml
+0
-68
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_fulltext_list.catalog_keys.xml
...ql_innodb/z_catalog_object_fulltext_list.catalog_keys.xml
+0
-5
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_fulltext_list.xml
...alog/erp5_mysql_innodb/z_catalog_object_fulltext_list.xml
+0
-81
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.catalog_keys.xml
...5_mysql_innodb/z_create_catalog_fulltext.catalog_keys.xml
+0
-5
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml
...l_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml
+0
-82
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogResultTableTemplateItem/result_table_list.xml
...alog/CatalogResultTableTemplateItem/result_table_list.xml
+0
-1
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_method_id_list
...5_mysql_innodb_catalog/bt/template_catalog_method_id_list
+0
-6
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_result_table_list
...ysql_innodb_catalog/bt/template_catalog_result_table_list
+0
-1
product/ZSQLCatalog/SearchKey/FullTextKey.py
product/ZSQLCatalog/SearchKey/FullTextKey.py
+30
-1
No files found.
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeDescriptionFullTextQuery.catalog_keys.xml
deleted
100644 → 0
View file @
7aafa7d0
<catalog_method>
</catalog_method>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeDescriptionFullTextQuery.xml
deleted
100644 → 0
View file @
7aafa7d0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
"""\n
MySQL\'s full text searchable key implementation.\n
"""\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
query = Query(**{\'catalog_full_text.fulltext_description\': value} )\n
return query\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
value
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SQLCatalog_makeDescriptionFullTextQuery
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeFullTextQuery.xml
View file @
a6ae33a5
...
...
@@ -51,11 +51,14 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
"""\n
MySQL\'s
full text searchable key implementation.\n
Default
full text searchable key implementation.\n
"""\n
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
query = Query(**{\'full_text.SearchableText\': value})\n
query = ComplexQuery(Query(title=value),\n
Query(reference=value),\n
operator="OR")\n
return query\n
</string>
</value>
</item>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeTitleFullTextQuery.catalog_keys.xml
deleted
100644 → 0
View file @
7aafa7d0
<catalog_method>
</catalog_method>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/SQLCatalog_makeTitleFullTextQuery.xml
deleted
100644 → 0
View file @
7aafa7d0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
"""\n
MySQL\'s full text searchable key implementation.\n
"""\n
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
query = Query(**{\'catalog_full_text.fulltext_title\': value} )\n
return query\n
</string>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string>
value
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
SQLCatalog_makeTitleFullTextQuery
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_catalog_fulltext.catalog_keys.xml
deleted
100644 → 0
View file @
7aafa7d0
<catalog_method>
<item
key=
"sql_clear_catalog"
type=
"int"
>
<value>
1
</value>
</item>
</catalog_method>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_drop_catalog_fulltext.xml
deleted
100644 → 0
View file @
7aafa7d0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
z0_drop_catalog_fulltext
</string>
</value>
</item>
<item>
<key>
<string>
max_cache_
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
<item>
<key>
<string>
max_rows_
</string>
</key>
<value>
<int>
1000
</int>
</value>
</item>
<item>
<key>
<string>
src
</string>
</key>
<value>
<string>
DROP TABLE IF EXISTS catalog_full_text
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_uncatalog_catalog_fulltext.catalog_keys.xml
deleted
100644 → 0
View file @
7aafa7d0
<catalog_method>
<item
key=
"sql_uncatalog_object"
type=
"int"
>
<value>
1
</value>
</item>
</catalog_method>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z0_uncatalog_catalog_fulltext.xml
deleted
100644 → 0
View file @
7aafa7d0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid
</string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_deferred_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
z0_uncatalog_catalog_fulltext
</string>
</value>
</item>
<item>
<key>
<string>
max_cache_
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
<item>
<key>
<string>
max_rows_
</string>
</key>
<value>
<int>
1000
</int>
</value>
</item>
<item>
<key>
<string>
src
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
DELETE FROM catalog_full_text WHERE <dtml-sqltest uid op=eq type=int>
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_fulltext_list.catalog_keys.xml
deleted
100644 → 0
View file @
7aafa7d0
<catalog_method>
<item
key=
"sql_catalog_object_list"
type=
"int"
>
<value>
1
</value>
</item>
</catalog_method>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_object_fulltext_list.xml
deleted
100644 → 0
View file @
7aafa7d0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string>
uid\r\n
getTitle\r\n
getDescription
</string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
z_catalog_object_fulltext_list
</string>
</value>
</item>
<item>
<key>
<string>
max_cache_
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
<item>
<key>
<string>
max_rows_
</string>
</key>
<value>
<int>
1000
</int>
</value>
</item>
<item>
<key>
<string>
src
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
REPLACE INTO\n
catalog_full_text (`uid`, `fulltext_title`, `fulltext_description`)\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))">
\n
(\n
<dtml-sqlvar
expr=
"uid[loop_item]"
type=
"int"
>
, \n
<dtml-sqlvar
expr=
"getTitle[loop_item]"
type=
"string"
optional
>
,\n
<dtml-sqlvar
expr=
"getDescription[loop_item]"
type=
"string"
optional
>
\n
)\n
<dtml-if
sequence-end
><dtml-else>
,
</dtml-if>
\n
</dtml-in>
\n
]]>
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.catalog_keys.xml
deleted
100644 → 0
View file @
7aafa7d0
<catalog_method>
<item
key=
"sql_clear_catalog"
type=
"int"
>
<value>
1
</value>
</item>
</catalog_method>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_create_catalog_fulltext.xml
deleted
100644 → 0
View file @
7aafa7d0
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"SQL"
module=
"Products.ZSQLMethods.SQL"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_col
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
allow_simple_one_argument_traversal
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
arguments_src
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
cache_time_
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
class_file_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
class_name_
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
connection_hook
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
connection_id
</string>
</key>
<value>
<string>
erp5_sql_connection
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
z_create_catalog_fulltext
</string>
</value>
</item>
<item>
<key>
<string>
max_cache_
</string>
</key>
<value>
<int>
100
</int>
</value>
</item>
<item>
<key>
<string>
max_rows_
</string>
</key>
<value>
<int>
1000
</int>
</value>
</item>
<item>
<key>
<string>
src
</string>
</key>
<value>
<string>
# Host:\n
# Database: test\n
# Table: \'catalog_full_text\'\n
#\n
CREATE TABLE `catalog_full_text` (\n
`uid` BIGINT UNSIGNED NOT NULL,\n
`fulltext_title` varchar(255) default \'\',\n
`fulltext_description` text,\n
PRIMARY KEY (`uid`),\n
FULLTEXT `title` (`fulltext_title`) COMMENT \'parser "TokenBigramSplitSymbolAlpha"\',\n
FULLTEXT `description` (`fulltext_description`) COMMENT \'parser "TokenBigramSplitSymbolAlpha"\'\n
) ENGINE=mroonga COMMENT=\'engine "innodb"\';\n
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogResultTableTemplateItem/result_table_list.xml
View file @
a6ae33a5
<key_list>
<key>
alarm
</key>
<key>
catalog
</key>
<key>
catalog_full_text
</key>
<key>
category
</key>
<key>
delivery
</key>
<key>
item
</key>
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_method_id_list
View file @
a6ae33a5
erp5_mysql_innodb/SQLCatalog_catalogTransformation
erp5_mysql_innodb/SQLCatalog_catalogTransformationList
erp5_mysql_innodb/SQLCatalog_makeDescriptionFullTextQuery
erp5_mysql_innodb/SQLCatalog_makeFullTextQuery
erp5_mysql_innodb/SQLCatalog_makeQuickSearchQuery
erp5_mysql_innodb/SQLCatalog_makeSearchTextQuery
erp5_mysql_innodb/SQLCatalog_makeTitleFullTextQuery
erp5_mysql_innodb/SQLCatalog_makeTranslatedTitleQuery
erp5_mysql_innodb/z0_drop_alarm
erp5_mysql_innodb/z0_drop_catalog
erp5_mysql_innodb/z0_drop_catalog_fulltext
erp5_mysql_innodb/z0_drop_category
erp5_mysql_innodb/z0_drop_delivery
erp5_mysql_innodb/z0_drop_item
...
...
@@ -24,7 +21,6 @@ erp5_mysql_innodb/z0_drop_transformation
erp5_mysql_innodb/z0_drop_translation
erp5_mysql_innodb/z0_drop_versioning
erp5_mysql_innodb/z0_uncatalog_alarm
erp5_mysql_innodb/z0_uncatalog_catalog_fulltext
erp5_mysql_innodb/z0_uncatalog_category
erp5_mysql_innodb/z0_uncatalog_item
erp5_mysql_innodb/z0_uncatalog_measure
...
...
@@ -40,7 +36,6 @@ erp5_mysql_innodb/z_catalog_item_list
erp5_mysql_innodb/z_catalog_measure_list
erp5_mysql_innodb/z_catalog_movement_category_list
erp5_mysql_innodb/z_catalog_non_movement_category_list
erp5_mysql_innodb/z_catalog_object_fulltext_list
erp5_mysql_innodb/z_catalog_object_list
erp5_mysql_innodb/z_catalog_paths
erp5_mysql_innodb/z_catalog_predicate_category_list
...
...
@@ -57,7 +52,6 @@ erp5_mysql_innodb/z_clear_reserved
erp5_mysql_innodb/z_count_results
erp5_mysql_innodb/z_create_alarm
erp5_mysql_innodb/z_create_catalog
erp5_mysql_innodb/z_create_catalog_fulltext
erp5_mysql_innodb/z_create_category
erp5_mysql_innodb/z_create_delivery
erp5_mysql_innodb/z_create_item
...
...
product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/template_catalog_result_table_list
View file @
a6ae33a5
catalog
catalog_full_text
category
alarm
delivery
...
...
product/ZSQLCatalog/SearchKey/FullTextKey.py
View file @
a6ae33a5
...
...
@@ -33,12 +33,15 @@ from Products.ZSQLCatalog.Query.SimpleQuery import SimpleQuery
from
Products.ZSQLCatalog.SearchText
import
parse
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
zope.interface.verify
import
verifyClass
import
re
FULLTEXT_BOOLEAN_DETECTOR
=
re
.
compile
(
r'.*((^|\
s)[
\+\
-<>
\(\
~]|[
\*\
)](
\s|$))'
)
class
FullTextKey
(
SearchKey
):
"""
This SearchKey generates SQL fulltext comparisons.
"""
default_comparison_operator
=
'match
_boolean
'
default_comparison_operator
=
'match'
get_operator_from_value
=
False
def
parseSearchText
(
self
,
value
,
is_column
):
...
...
@@ -50,6 +53,32 @@ class FullTextKey(SearchKey):
def
_renderValueAsSearchText
(
self
,
value
,
operator
):
return
'(%s)'
%
(
value
,
)
def
_processSearchValue
(
self
,
search_value
,
logical_operator
,
comparison_operator
):
"""
Special SearchValue processor for FullText queries: if a searched value
from 'match' operator group contains an operator recognised in boolean
mode, make the operator for that value be 'match_boolean'.
"""
operator_value_dict
,
logical_operator
,
parsed
=
\
SearchKey
.
_processSearchValue
(
self
,
search_value
,
logical_operator
,
comparison_operator
)
new_value_list
=
[]
append
=
new_value_list
.
append
for
value
in
operator_value_dict
.
pop
(
'match'
,
[]):
if
isinstance
(
value
,
basestring
)
and
\
FULLTEXT_BOOLEAN_DETECTOR
.
match
(
value
)
is
not
None
:
operator_value_dict
.
setdefault
(
'match_boolean'
,
[]).
append
(
value
)
else
:
append
(
value
)
if
len
(
new_value_list
):
if
'match_boolean'
in
operator_value_dict
:
# use boolean mode for all expressions
operator_value_dict
[
'match_boolean'
].
extend
(
new_value_list
)
else
:
operator_value_dict
[
'match'
]
=
new_value_list
return
operator_value_dict
,
logical_operator
,
parsed
def
_buildQuery
(
self
,
operator_value_dict
,
logical_operator
,
parsed
,
group
):
"""
Special Query builder for FullText queries: merge all values having the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment