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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
francois
erp5
Commits
e2a44469
Commit
e2a44469
authored
Oct 31, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
full text: revert imperfect changes to make FullTextKey behave somehow close to MroongaFullTextKey.
parent
ae7c1a91
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
product/ZSQLCatalog/SearchKey/FullTextKey.py
product/ZSQLCatalog/SearchKey/FullTextKey.py
+6
-14
No files found.
product/ZSQLCatalog/SearchKey/FullTextKey.py
View file @
e2a44469
...
...
@@ -29,8 +29,6 @@
##############################################################################
from
DefaultKey
import
DefaultKey
from
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
Products.ZSQLCatalog.SearchText
import
dequote
...
...
@@ -98,18 +96,12 @@ class FullTextKey(DefaultKey):
value_list
=
operator_value_dict
.
pop
(
comparison_operator
,
[])
if
not
value_list
:
continue
if
logical_operator
==
'or'
:
joined_value
=
' '
.
join
(
value_list
)
append
(
SimpleQuery
(
search_key
=
self
,
comparison_operator
=
comparison_operator
,
group
=
group
,
**
{
column
:
joined_value
}))
else
:
# In MySQL FTS, no operator implies OR so that we cannot merge
# AND queries into one.
for
value
in
value_list
:
# XXX:
# In MySQL FTS, no operator implies OR so that we should not merge
# AND queries into one...
append
(
SimpleQuery
(
search_key
=
self
,
comparison_operator
=
comparison_operator
,
group
=
group
,
**
{
column
:
value
}))
group
=
group
,
**
{
column
:
' '
.
join
(
value_list
)
}))
# Other comparison operators are handled by the super class.
if
operator_value_dict
:
query_list
+=
super
(
FullTextKey
,
self
).
_buildQuery
(
...
...
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