Products :: ZenUtils :: MultiPathIndex :: MultiPathIndex :: Class MultiPathIndex |
[hide private]
[frames] | no frames]

# Class MultiPathIndex

source code

    PluginIndexes.PathIndex.PathIndex.PathIndex --+
                                                  |
                ExtendedPathIndex.ExtendedPathIndex --+
                                                      |
                                                     MultiPathIndex

A path index that is capable of indexing multiple paths per object.

Instance Methods | [hide private]
search(self, path, default_level=0, depth=-1, navtree=0, navtree_start=0) path is either a string representing a relative URL or a part of a relative URL or a tuple (path,level). | source code
_pathSanityCheck(self, searchPath, pathset) Extended path index uses a series of set "buckets" to store which items belong at which point on the search path, this can sometimes cause issues if two points on the path have the same name and thus belong to the same bucket For instance: /zport/dmd/Devices/Server/Windows/WMI/devices/test-winxp-1.zenoss.loc/os/software/VMware Tools has another path at /zport/dmd/Manfacturers/VMware/... | source code
getIndexSourceNames(self) return names of indexed attributes | source code
index_object(self, docid, obj, threshold=100) hook for (Z)Catalog | source code
index_paths(self, docid, paths) | source code
unindex_paths(self, docid, paths) | source code
unindex_object(self, docid) hook for (Z)Catalog | source code
Inherited from `ExtendedPathIndex.ExtendedPathIndex`: `__init__`, `clear`, `insertEntry` Inherited from `ExtendedPathIndex.ExtendedPathIndex` (private): `_apply_index`

Class Variables | [hide private]
| meta_type = `"MultiPathIndex"`
| manage_main = `DTMLFile('dtml/manageMultiPathIndex', globals())`
| manage = `DTMLFile('dtml/manageMultiPathIndex', globals())`
Inherited from `ExtendedPathIndex.ExtendedPathIndex`: `index_html`, `manage_options`, `manage_workspace`, `query_options`

Method Details | [hide private]

### search(self, path, default_level=0, depth=-1, navtree=0, navtree_start=0) | source code
path is either a string representing a relative URL or a part of a relative URL or a tuple (path,level). level >= 0 starts searching at the given level level < 0 not implemented yet Overrides: ExtendedPathIndex.ExtendedPathIndex.search (inherited documentation)

### _pathSanityCheck(self, searchPath, pathset) | source code
Extended path index uses a series of set "buckets" to store which items belong at which point on the search path, this can sometimes cause issues if two points on the path have the same name and thus belong to the same bucket For instance: /zport/dmd/Devices/Server/Windows/WMI/devices/test-winxp-1.zenoss.loc/os/software/VMware Tools has another path at /zport/dmd/Manfacturers/VMware/... and our search returns a false positive because we search for /zport/dmd/Devices/VMware because we have the id for that component returned at each point along the path. So this function iterates through all the return paths and makes sure the path that we are searching for is in the path that is returned

### getIndexSourceNames(self) | source code
return names of indexed attributes Overrides: ExtendedPathIndex.ExtendedPathIndex.getIndexSourceNames

### index_object(self, docid, obj, threshold=100) | source code
hook for (Z)Catalog Overrides: ExtendedPathIndex.ExtendedPathIndex.index_object

### unindex_object(self, docid) | source code
hook for (Z)Catalog Overrides: ExtendedPathIndex.ExtendedPathIndex.unindex_object