eea.facetednavigation icon indicating copy to clipboard operation
eea.facetednavigation copied to clipboard

Path depth/level

Open cedricmessiant opened this issue 10 years ago • 2 comments

Why do depth parameter of path widget in fact uses the level parameter for catalog query ? I want to fix this but I'm not sure if it is a bug or a feature (in fact, the parameter doesn't do what it says.)

cedricmessiant avatar Apr 14 '15 08:04 cedricmessiant

Can you detail a little bit, please? How it should be? Maybe it's an old code coming from Plone-2.5 era :). We didn't use that much this widget, so it may be a bug.

Thank you.

avoinea avatar Apr 15 '15 11:04 avoinea

Depth parameter is about how many levels deep you make the query (0 is only the brain of the given path, 1 is it and its children) : http://docs.plone.org/develop/plone/searching_and_indexing/query.html?highlight=querying#query-by-path The level parameter is the level from which you search the level path. For example, catalog(path=dict(query='some/path', level=2)) searches for all objects whose path contains some/path at level 2. This includes paths like /foo/bar/some/path and /spam/eggs/some/path, plus all children of those paths.

The plone documentation does not refer to the level parameter. You have to look at Products.ExtendedPathIndex readme to get information on it : https://github.com/plone/Products.ExtendedPathIndex/blob/master/README.txt

cedricmessiant avatar Apr 20 '15 11:04 cedricmessiant