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
af43738b
Commit
af43738b
authored
Jul 25, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #2423: Searching a FieldIndexes for documents
with a blank string has been broken.
parent
f56e7a49
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
doc/CHANGES.txt
doc/CHANGES.txt
+2
-0
lib/python/Products/PluginIndexes/common/util.py
lib/python/Products/PluginIndexes/common/util.py
+10
-5
No files found.
doc/CHANGES.txt
View file @
af43738b
...
...
@@ -24,6 +24,8 @@ Zope Changes
the __getslice__ implementation used range() instead
of xrange().
- Collector #2423: Searching a FieldIndexes for documents
with a blank string has been broken.
Zope 2.4 beta 2
...
...
lib/python/Products/PluginIndexes/common/util.py
View file @
af43738b
...
...
@@ -83,7 +83,7 @@
#
#############################################################################
__version__
=
'$Id: util.py,v 1.
6 2001/06/13 14:22:52 shane
Exp $'
__version__
=
'$Id: util.py,v 1.
7 2001/07/25 13:30:04 andreasjung
Exp $'
import
re
...
...
@@ -199,9 +199,14 @@ class parseIndexRequest:
if
request
.
has_key
(
field
):
setattr
(
self
,
op
,
request
[
field
])
if
keys
is
not
None
:
# Filter out empty strings.
keys
=
filter
(
lambda
key
:
key
!=
''
,
keys
)
# This was some kind of over-optimimization and broke
# queries with ("",) to search for empty fields
# (See Collector 2423)
# if keys is not None:
# # Filter out empty strings.
# keys = filter(lambda key: key != '', keys)
if
not
keys
:
keys
=
None
...
...
@@ -219,7 +224,7 @@ class parseIndexRequest:
def
test
():
r
=
parseIndexRequest
({
'path'
:{
'query'
:
"
xxxx
"
,
"level"
:
2
,
"operator"
:
'and'
}},
'path'
,[
'query'
,
"level"
,
"operator"
])
r
=
parseIndexRequest
({
'path'
:{
'query'
:
""
,
"level"
:
2
,
"operator"
:
'and'
}},
'path'
,[
'query'
,
"level"
,
"operator"
])
for
k
in
dir
(
r
):
print
k
,
getattr
(
r
,
k
)
...
...
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