Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5_fork
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
Eteri
erp5_fork
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
Hide 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 @@
...
@@ -29,8 +29,6 @@
##############################################################################
##############################################################################
from
DefaultKey
import
DefaultKey
from
DefaultKey
import
DefaultKey
from
SearchKey
import
SearchKey
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
Products.ZSQLCatalog.SearchText
import
dequote
from
Products.ZSQLCatalog.SearchText
import
dequote
...
@@ -98,18 +96,12 @@ class FullTextKey(DefaultKey):
...
@@ -98,18 +96,12 @@ class FullTextKey(DefaultKey):
value_list
=
operator_value_dict
.
pop
(
comparison_operator
,
[])
value_list
=
operator_value_dict
.
pop
(
comparison_operator
,
[])
if
not
value_list
:
if
not
value_list
:
continue
continue
if
logical_operator
==
'or'
:
# XXX:
joined_value
=
' '
.
join
(
value_list
)
# In MySQL FTS, no operator implies OR so that we should not merge
append
(
SimpleQuery
(
search_key
=
self
,
# AND queries into one...
comparison_operator
=
comparison_operator
,
append
(
SimpleQuery
(
search_key
=
self
,
group
=
group
,
**
{
column
:
joined_value
}))
comparison_operator
=
comparison_operator
,
else
:
group
=
group
,
**
{
column
:
' '
.
join
(
value_list
)}))
# In MySQL FTS, no operator implies OR so that we cannot merge
# AND queries into one.
for
value
in
value_list
:
append
(
SimpleQuery
(
search_key
=
self
,
comparison_operator
=
comparison_operator
,
group
=
group
,
**
{
column
:
value
}))
# Other comparison operators are handled by the super class.
# Other comparison operators are handled by the super class.
if
operator_value_dict
:
if
operator_value_dict
:
query_list
+=
super
(
FullTextKey
,
self
).
_buildQuery
(
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