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
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
f88e1066
Commit
f88e1066
authored
Sep 13, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Workaround mariadb crazy slow query when using fulltext key."
This reverts commit
1159063c
.
parent
cdb121a7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
product/ZSQLCatalog/SearchKey/MroongaBooleanFullTextKey.py
product/ZSQLCatalog/SearchKey/MroongaBooleanFullTextKey.py
+1
-1
product/ZSQLCatalog/SearchKey/MroongaFullTextKey.py
product/ZSQLCatalog/SearchKey/MroongaFullTextKey.py
+3
-11
No files found.
product/ZSQLCatalog/SearchKey/MroongaBooleanFullTextKey.py
View file @
f88e1066
...
...
@@ -35,6 +35,6 @@ class MroongaBooleanFullTextKey(MroongaFullTextKey):
This SearchKey generates SQL fulltext comparisons for Mroonga whose
default comparison operator is mroonga_boolean.
"""
default_
fulltext_
comparison_operator
=
'mroonga_boolean'
default_comparison_operator
=
'mroonga_boolean'
verifyClass
(
ISearchKey
,
MroongaBooleanFullTextKey
)
product/ZSQLCatalog/SearchKey/MroongaFullTextKey.py
View file @
f88e1066
...
...
@@ -26,14 +26,14 @@
#
##############################################################################
from
KeywordKey
import
Keyword
Key
from
DefaultKey
import
Default
Key
from
Products.ZSQLCatalog.Query.SimpleQuery
import
SimpleQuery
from
Products.ZSQLCatalog.interfaces.search_key
import
ISearchKey
from
Products.ZSQLCatalog.SearchText
import
dequote
from
zope.interface.verify
import
verifyClass
class
MroongaFullTextKey
(
Keyword
Key
):
default_
fulltext_
comparison_operator
=
'mroonga'
class
MroongaFullTextKey
(
Default
Key
):
default_comparison_operator
=
'mroonga'
def
dequoteParsedText
(
self
):
return
False
...
...
@@ -45,14 +45,6 @@ class MroongaFullTextKey(KeywordKey):
# from fulltext='a b' that means fulltext search with (a AND b).
return
'(%s)'
%
(
value
,
)
def
_guessComparisonOperator
(
self
,
value
):
if
isinstance
(
value
,
basestring
)
and
value
[:
1
]
in
(
'+'
,
'-'
):
operator
=
self
.
default_fulltext_comparison_operator
else
:
operator
=
super
(
MroongaFullTextKey
,
self
).
_guessComparisonOperator
(
value
)
return
operator
def
_processSearchValue
(
self
,
search_value
,
logical_operator
,
comparison_operator
):
operator_value_dict
,
logical_operator
,
parsed
=
\
...
...
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