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
f82d8220
Commit
f82d8220
authored
Feb 20, 2003
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Collector #814: Use IITreeSet for the sets since they may be large.
parent
610625b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
+12
-12
No files found.
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
View file @
f82d8220
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
#
#
##############################################################################
##############################################################################
__version__
=
'$Id: PathIndex.py,v 1.3
2 2003/01/27 18:59:17 fdrake
Exp $'
__version__
=
'$Id: PathIndex.py,v 1.3
3 2003/02/20 19:48:03 jeremy
Exp $'
from
Products.PluginIndexes
import
PluggableIndex
from
Products.PluginIndexes
import
PluggableIndex
from
Products.PluginIndexes.common.util
import
parseIndexRequest
from
Products.PluginIndexes.common.util
import
parseIndexRequest
...
@@ -21,7 +21,7 @@ from Acquisition import Implicit
...
@@ -21,7 +21,7 @@ from Acquisition import Implicit
from
BTrees.IOBTree
import
IOBTree
from
BTrees.IOBTree
import
IOBTree
from
BTrees.OOBTree
import
OOBTree
from
BTrees.OOBTree
import
OOBTree
from
BTrees.IIBTree
import
IISet
,
intersection
,
union
from
BTrees.IIBTree
import
II
TreeSet
,
II
Set
,
intersection
,
union
from
OFS.SimpleItem
import
SimpleItem
from
OFS.SimpleItem
import
SimpleItem
from
zLOG
import
LOG
,
ERROR
from
zLOG
import
LOG
,
ERROR
from
types
import
StringType
,
ListType
,
TupleType
from
types
import
StringType
,
ListType
,
TupleType
...
@@ -77,23 +77,23 @@ class PathIndex(Persistent, Implicit, SimpleItem):
...
@@ -77,23 +77,23 @@ class PathIndex(Persistent, Implicit, SimpleItem):
self
.
_unindex
=
IOBTree
()
self
.
_unindex
=
IOBTree
()
def
insertEntry
(
self
,
comp
,
id
,
level
):
def
insertEntry
(
self
,
comp
,
id
,
level
):
"""
"""Insert an entry.
k is a path component (generated by splitPath() )
v is the documentId
comp is a path component (generated by splitPath() )
id is the documentId
level is the level of the component inside the path
level is the level of the component inside the path
"""
"""
if
self
.
_index
.
has_key
(
comp
)
==
0
:
if
self
.
_index
.
has_key
(
comp
)
==
0
:
self
.
_index
[
comp
]
=
IOBTree
()
self
.
_index
[
comp
]
=
IOBTree
()
if
self
.
_index
[
comp
].
has_key
(
level
)
==
0
:
if
self
.
_index
[
comp
].
has_key
(
level
)
==
0
:
self
.
_index
[
comp
][
level
]
=
IISet
()
self
.
_index
[
comp
][
level
]
=
II
Tree
Set
()
self
.
_index
[
comp
][
level
].
insert
(
id
)
self
.
_index
[
comp
][
level
].
insert
(
id
)
if
level
>
self
.
_depth
:
if
level
>
self
.
_depth
:
self
.
_depth
=
level
self
.
_depth
=
level
def
index_object
(
self
,
documentId
,
obj
,
threshold
=
100
):
def
index_object
(
self
,
documentId
,
obj
,
threshold
=
100
):
...
...
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