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
6ece710d
Commit
6ece710d
authored
Sep 17, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added unindex_item.
This thing needs an overhaul; already. :-(
parent
4bde4f28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
lib/python/SearchIndex/TextIndex.py
lib/python/SearchIndex/TextIndex.py
+13
-4
No files found.
lib/python/SearchIndex/TextIndex.py
View file @
6ece710d
...
...
@@ -127,8 +127,8 @@ Notes on a new text index design
$Id: TextIndex.py,v 1.
2 1997/09/12 14:25:40
jim Exp $'''
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
$Id: TextIndex.py,v 1.
3 1997/09/17 17:53:32
jim Exp $'''
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
from
Globals
import
Persistent
from
Trie
import
Trie
...
...
@@ -215,6 +215,9 @@ class TextIndex(Persistent):
r
=
w2ids
[
word
]
=
intSet
()
r
.
insert
(
id
)
def
unindex_item
(
self
,
id
):
del
self
.
_id2info
[
id
]
def
_subindex
(
self
,
isrc
,
d
,
pos
):
src
=
WordSequence
(
isrc
,
self
.
_syn
)
...
...
@@ -238,8 +241,10 @@ class TextIndex(Persistent):
info
=
self
.
_id2info
for
id
in
set
:
v
=
info
[
id
]
r
[
id
]
=
v
[
0
],
v
[
1
][
word
]
try
:
v
=
info
[
id
]
r
[
id
]
=
v
[
0
],
v
[
1
][
word
]
except
:
pass
return
r
...
...
@@ -284,6 +289,10 @@ class TextIndex(Persistent):
##############################################################################
#
# $Log: TextIndex.py,v $
# Revision 1.3 1997/09/17 17:53:32 jim
# Added unindex_item.
# This thing needs an overhaul; already. :-(
#
# Revision 1.2 1997/09/12 14:25:40 jim
# Added logic to allow "blank" inputs.
#
...
...
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