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
425e0a91
Commit
425e0a91
authored
Dec 03, 1996
by
chris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated doc strings
parent
005aafef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
27 deletions
+12
-27
lib/python/SearchIndex/InvertedIndex.py
lib/python/SearchIndex/InvertedIndex.py
+12
-27
No files found.
lib/python/SearchIndex/InvertedIndex.py
View file @
425e0a91
...
...
@@ -27,15 +27,12 @@ Example usage:
i.index(doc, key)
# perform a test search
try:
print i['blah']
except KeyError:
print 'No such key, "blah"'
print i['blah']
InvertedIndex provides three types of indexes: one non-persistent
index, Index, and two persistent indexes, Persistent and Transactional.
$Id: InvertedIndex.py,v 1.
4 1996/12/03 18:11:5
7 chris Exp $'''
$Id: InvertedIndex.py,v 1.
5 1996/12/03 18:15:0
7 chris Exp $'''
# Copyright
#
# Copyright 1996 Digital Creations, L.C., 910 Princess Anne
...
...
@@ -87,6 +84,9 @@ $Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $'''
# (540) 371-6909
#
# $Log: InvertedIndex.py,v $
# Revision 1.5 1996/12/03 18:15:07 chris
# Updated doc strings
#
# Revision 1.4 1996/12/03 18:11:57 chris
# Went back to returning empty ResultLists for failed searches.
#
...
...
@@ -104,7 +104,7 @@ $Id: InvertedIndex.py,v 1.4 1996/12/03 18:11:57 chris Exp $'''
#
#
#
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
5
$'
[
11
:
-
2
]
import
regex
,
regsub
,
string
,
marshal
...
...
@@ -291,10 +291,7 @@ class Index:
i.index(doc, key)
# perform a test search
try:
print i['blah']
except KeyError:
print 'No such key, "blah"'
print i['blah']
'''
list_class
=
ResultList
...
...
@@ -558,11 +555,8 @@ class Persistent(Index):
i.index(doc, key)
# perform a test search
try:
print i['blah']
except KeyError:
print 'No such key, "blah"'
print i['blah']
Using an existing index:
doc = open('/usr/users/chris/doc2.txt', 'r').read()
...
...
@@ -577,10 +571,7 @@ class Persistent(Index):
i.index(doc, key)
# perform a test search
try:
print i['blah']
except KeyError:
print 'No such key, "blah"'
print i['blah']
'''
list_class
=
PersistentResultList
...
...
@@ -703,10 +694,7 @@ class Transactional(Index):
get_transaction().commit()
# perform a test search
try:
print i['blah']
except KeyError:
print 'No such key, "blah"'
print i['blah']
Using an existing index:
...
...
@@ -722,10 +710,7 @@ class Transactional(Index):
i.index(doc, key)
# perform a test search
try:
print i['blah']
except KeyError:
print 'No such key, "blah"'
print i['blah']
'''
list_class
=
STPResultList
...
...
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