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
a46be1ec
Commit
a46be1ec
authored
Feb 04, 2003
by
Casey Duncan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge unindex speed optimization from branch
parent
a2c624ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
9 deletions
+3
-9
lib/python/Products/ZCTextIndex/BaseIndex.py
lib/python/Products/ZCTextIndex/BaseIndex.py
+3
-9
No files found.
lib/python/Products/ZCTextIndex/BaseIndex.py
View file @
a46be1ec
...
...
@@ -286,17 +286,11 @@ class BaseIndex(Persistent):
def
_del_wordinfo
(
self
,
wid
,
docid
):
doc2score
=
self
.
_wordinfo
[
wid
]
del
doc2score
[
docid
]
numdocs
=
len
(
doc2score
)
if
numdocs
==
0
:
if
doc2score
:
self
.
_wordinfo
[
wid
]
=
doc2score
# not redundant: Persistency!
else
:
del
self
.
_wordinfo
[
wid
]
self
.
length
.
change
(
-
1
)
return
if
numdocs
==
self
.
DICT_CUTOFF
:
new
=
{}
for
k
,
v
in
doc2score
.
items
():
new
[
k
]
=
v
doc2score
=
new
self
.
_wordinfo
[
wid
]
=
doc2score
# not redundant: Persistency!
def
inverse_doc_frequency
(
term_count
,
num_items
):
"""Return the inverse doc frequency for a term,
...
...
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