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
alecs_myu
erp5
Commits
4c129961
Commit
4c129961
authored
Nov 26, 2012
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't insert in full_text table if there are no SearchableText
parent
60c128b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
12 deletions
+23
-12
bt5/erp5_full_text_myisam_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_fulltext_list.xml
...tal_catalog/erp5_mysql_innodb/z_catalog_fulltext_list.xml
+22
-11
bt5/erp5_full_text_myisam_catalog/bt/revision
bt5/erp5_full_text_myisam_catalog/bt/revision
+1
-1
No files found.
bt5/erp5_full_text_myisam_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_catalog_fulltext_list.xml
View file @
4c129961
...
...
@@ -55,20 +55,31 @@ SearchableText</string> </value>
<key>
<string>
src
</string>
</key>
<value>
<string
encoding=
"cdata"
>
<![CDATA[
REPLACE INTO\n
DELETE FROM\n
full_text\n
WHERE\n
<dtml-in uid>
\n
uid=
<dtml-sqlvar
sequence-item
type=
"int"
><dtml-if
sequence-end
><dtml-else>
OR
</dtml-if>
\n
</dtml-in>
\n
;\n
<dtml-var
"\'\\0\'"
><dtml-let
document_list=
"[]"
>
\n
<dtml-in
prefix=
"loop"
expr=
"_.range(_.len(uid))"
>
\n
<dtml-if
"SearchableText[loop_item]"
>
\n
<dtml-call
expr=
"document_list.append(loop_item)"
>
\n
</dtml-if>
\n
</dtml-in>
\n
<dtml-if
expr=
"_.len(document_list) > 0"
>
\n
INSERT INTO\n
full_text\n
VALUES\n
<dtml-in prefix="loop" expr="_.range(_.len(uid))
">
\n
(\n
<dtml-sqlvar
expr=
"uid[loop_item]"
type=
"int"
>
,
\n
<dtml-in
prefix=
"loop"
expr=
"document_list
"
>
\n
(
\n
<dtml-sqlvar
expr=
"uid[loop_item]"
type=
"int"
>
,\n
<dtml-sqlvar
expr=
"SearchableText[loop_item]"
type=
"string"
optional
>
\n
)\n
<dtml-if
sequence-end
>
\n
<dtml-else>
\n
,\n
</dtml-if>
\n
</dtml-in>
\n
)
<dtml-unless
sequence-end
>
,
</dtml-unless>
\n
</dtml-in>
\n
</dtml-if>
\n
</dtml-let>
]]>
</string>
</value>
</item>
...
...
bt5/erp5_full_text_myisam_catalog/bt/revision
View file @
4c129961
5
\ No newline at end of file
6
\ No newline at end of file
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