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
f0884090
Commit
f0884090
authored
May 13, 1999
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added forgotten checkin
parent
1d3d18f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
20 deletions
+13
-20
lib/python/SearchIndex/Index.py
lib/python/SearchIndex/Index.py
+13
-20
No files found.
lib/python/SearchIndex/Index.py
View file @
f0884090
...
...
@@ -84,7 +84,7 @@
##############################################################################
"""Simple column indices"""
__version__
=
'$Revision: 1.2
5
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.2
6
$'
[
11
:
-
2
]
from
Globals
import
Persistent
from
BTree
import
BTree
...
...
@@ -206,9 +206,7 @@ class Index(Persistent):
def
index_item
(
self
,
i
,
obj
=
None
):
"""Recompute index data for data with ids >= start."""
index
=
self
.
_index
id
=
self
.
id
if
(
self
.
_schema
is
None
)
or
(
obj
is
not
None
):
f
=
getattr
...
...
@@ -219,16 +217,12 @@ class Index(Persistent):
if
obj
is
None
:
obj
=
self
.
_data
[
i
]
try
:
if
self
.
call_methods
:
k
=
f
(
obj
,
id
)()
else
:
k
=
f
(
obj
,
id
)
except
:
pass
if
k
is
None
or
k
==
MV
:
return
try
:
k
=
f
(
obj
,
id
)
except
:
return
if
self
.
call_methods
:
k
=
k
()
if
k
is
None
or
k
==
MV
:
return
set
=
index
.
get
(
k
)
if
set
is
None
:
index
[
k
]
=
set
=
intSet
()
...
...
@@ -237,24 +231,23 @@ class Index(Persistent):
def
unindex_item
(
self
,
i
,
obj
=
None
):
"""Recompute index data for data with ids >= start."""
index
=
self
.
_index
id
=
self
.
id
if
self
.
_schema
is
None
:
f
=
getattr
else
:
f
=
operator
.
__getitem__
id
=
self
.
_schema
[
id
]
if
obj
is
None
:
obj
=
self
.
_data
[
i
]
try
:
k
=
f
(
obj
,
id
)
except
:
return
if
self
.
call_methods
:
k
=
f
(
obj
,
id
)
()
else
:
k
=
f
(
obj
,
id
)
k
=
k
()
if
k
is
None
or
k
==
MV
:
return
set
=
index
.
get
(
k
)
if
set
is
not
None
:
set
.
remove
(
i
)
...
...
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