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
9cbf0546
Commit
9cbf0546
authored
Jul 04, 2009
by
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added 'indexSize' to IPluggableIndex
parent
6699c31f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
20 deletions
+12
-20
src/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
src/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
+0
-12
src/Products/PluginIndexes/PathIndex/PathIndex.py
src/Products/PluginIndexes/PathIndex/PathIndex.py
+2
-2
src/Products/PluginIndexes/TopicIndex/TopicIndex.py
src/Products/PluginIndexes/TopicIndex/TopicIndex.py
+5
-0
src/Products/PluginIndexes/common/UnIndex.py
src/Products/PluginIndexes/common/UnIndex.py
+2
-2
src/Products/PluginIndexes/interfaces.py
src/Products/PluginIndexes/interfaces.py
+3
-4
No files found.
src/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
View file @
9cbf0546
...
...
@@ -299,18 +299,6 @@ class DateRangeIndex(UnIndex):
return
result
,
(
self
.
_since_field
,
self
.
_until_field
)
#
# ZCatalog needs this, although it isn't (yet) part of the interface.
#
security
.
declareProtected
(
view
,
'numObjects'
)
def
numObjects
(
self
):
""" """
return
len
(
self
.
_unindex
)
def
indexSize
(
self
):
""" """
return
len
(
self
)
#
# Helper functions.
#
...
...
src/Products/PluginIndexes/PathIndex/PathIndex.py
View file @
9cbf0546
...
...
@@ -193,11 +193,11 @@ class PathIndex(Persistent, SimpleItem):
return
results
def
numObjects
(
self
):
"""
return the number distinct values
"""
"""
Return the number of indexed objects.
"""
return
len
(
self
.
_unindex
)
def
indexSize
(
self
):
"""
return the number of indexed objects
"""
"""
Return the size of the index in terms of distinct values.
"""
return
len
(
self
)
def
__len__
(
self
):
...
...
src/Products/PluginIndexes/TopicIndex/TopicIndex.py
View file @
9cbf0546
...
...
@@ -85,6 +85,11 @@ class TopicIndex(Persistent, SimpleItem):
return
1
def
numObjects
(
self
):
"""Return the number of indexed objects."""
return
"n/a"
def
indexSize
(
self
):
"""Return the size of the index in terms of distinct values."""
return
"n/a"
def
search
(
self
,
filter_id
):
...
...
src/Products/PluginIndexes/common/UnIndex.py
View file @
9cbf0546
...
...
@@ -277,11 +277,11 @@ class UnIndex(SimpleItem):
return
datum
def
numObjects
(
self
):
"""
return number of indexed objects
"""
"""
Return the number of indexed objects.
"""
return
len
(
self
.
_unindex
)
def
indexSize
(
self
):
"""
return of distinct values indexed
"""
"""
Return the size of the index in terms of distinct values.
"""
return
len
(
self
)
def
unindex_object
(
self
,
documentId
):
...
...
src/Products/PluginIndexes/interfaces.py
View file @
9cbf0546
...
...
@@ -68,11 +68,10 @@ class IPluggableIndex(Interface):
"""
def
numObjects
():
"""Return the number of indexed objects"""
"""Return the number of indexed objects
.
"""
# XXX: not implemented by TextIndex and TopicIndex
# def indexSize():
# """Return the size of the index in terms of distinct values"""
def
indexSize
():
"""Return the size of the index in terms of distinct values."""
def
clear
():
"""Empty the index"""
...
...
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