Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Kirill Smelkov
Zope
Commits
41d1b026
Commit
41d1b026
authored
Mar 27, 2001
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merged fix for NOP in regex from 2.3 branch
parent
ab4f4767
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/python/SearchIndex/TextIndex.py
lib/python/SearchIndex/TextIndex.py
+2
-2
No files found.
lib/python/SearchIndex/TextIndex.py
View file @
41d1b026
...
@@ -202,7 +202,7 @@ Notes on a new text index design
...
@@ -202,7 +202,7 @@ Notes on a new text index design
space.
space.
"""
"""
__version__
=
'$Revision: 1.2
7
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
8
$'
[
11
:
-
2
]
#XXX I strongly suspect that this is broken, but I'm not going to fix it. :(
#XXX I strongly suspect that this is broken, but I'm not going to fix it. :(
...
@@ -463,7 +463,7 @@ QueryError='TextIndex.QueryError'
...
@@ -463,7 +463,7 @@ QueryError='TextIndex.QueryError'
def
query
(
s
,
index
,
default_operator
=
Or
,
def
query
(
s
,
index
,
default_operator
=
Or
,
ws
=
(
string
.
whitespace
,)):
ws
=
(
string
.
whitespace
,)):
# First replace any occurences of " and not " with " andnot "
# First replace any occurences of " and not " with " andnot "
s
=
ts_regex
.
gsub
(
'[%s]+and[%s]
*
not[%s]+'
%
(
ws
*
3
),
' andnot '
,
s
)
s
=
ts_regex
.
gsub
(
'[%s]+and[%s]
+
not[%s]+'
%
(
ws
*
3
),
' andnot '
,
s
)
q
=
parse
(
s
)
q
=
parse
(
s
)
q
=
parse2
(
q
,
default_operator
)
q
=
parse2
(
q
,
default_operator
)
return
evaluate
(
q
,
index
)
return
evaluate
(
q
,
index
)
...
...
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