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
005aafef
Commit
005aafef
authored
Dec 03, 1996
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Went back to returning empty ResultLists for failed searches.
parent
1bec64f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
lib/python/SearchIndex/InvertedIndex.py
lib/python/SearchIndex/InvertedIndex.py
+15
-6
No files found.
lib/python/SearchIndex/InvertedIndex.py
View file @
005aafef
...
...
@@ -35,7 +35,7 @@ Example usage:
InvertedIndex provides three types of indexes: one non-persistent
index, Index, and two persistent indexes, Persistent and Transactional.
$Id: InvertedIndex.py,v 1.
3 1996/12/03 17:44:21
chris Exp $'''
$Id: InvertedIndex.py,v 1.
4 1996/12/03 18:11:57
chris Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -87,6 +87,9 @@ $Id: InvertedIndex.py,v 1.3 1996/12/03 17:44:21 chris Exp $'''
# (540) 371-6909
#
# $Log: InvertedIndex.py,v $
# Revision 1.4 1996/12/03 18:11:57 chris
# Went back to returning empty ResultLists for failed searches.
#
# Revision 1.3 1996/12/03 17:44:21 chris
# Added pack() methods to Persistent and Transactional.
# Disabled autosave on Persistent.
...
...
@@ -101,7 +104,7 @@ $Id: InvertedIndex.py,v 1.3 1996/12/03 17:44:21 chris Exp $'''
#
#
#
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
import
regex
,
regsub
,
string
,
marshal
...
...
@@ -410,19 +413,25 @@ class Index:
Lists
=
dict
.
keys
()
if
(
not
len
(
Lists
)):
r
aise
KeyError
r
eturn
List
()
return
reduce
(
lambda
x
,
y
:
x
|
y
,
Lists
)
key
=
string
.
lower
(
key
)
key
=
index
[
key
]
try
:
key
=
index
[
key
]
except
KeyError
:
return
List
()
while
(
type
(
key
)
==
StringType
):
key
=
index
[
key
]
try
:
key
=
index
[
key
]
except
KeyError
:
return
List
()
if
(
key
is
None
):
r
aise
KeyError
r
eturn
List
()
return
key
...
...
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