ezfind: how to limitate the search result by depth?

Author Message

Georg Franz

Tuesday 13 July 2010 5:04:45 am

Hi folks,

I've a tree with a lot of folders. I only want to fetch articles from folders which have a specific checkbox checked.

So, I would do 2 fetches with ezfind:

a) fetch all folders where the checkbox is checked

b) fetch all articles from these folders

My problem: ezfind is fetching the result from the complete tree, I cannot specify the relative depth.

So, is there a parameter 'depth' but it's not documented? Have I switch to the subtree fetch from ez?

Best wishes,

Georg.

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Ivo Lukac

Tuesday 13 July 2010 5:35:37 am

Just checked the schema.xml in 2.2 version and there is a "meta_depth_si" field, but I am not getting it in results when searching. Seems like it is missing in ezfind indexing function...

Paul should know :)

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

Georg Franz

Tuesday 13 July 2010 5:42:46 am

Hi Ivo,

thanx for info! :-)

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Paul Borgermans

Tuesday 13 July 2010 7:47:52 am

Hi Georg, Ivo,

the depth is not indexed (yet), even though it was foreseen schema-wise in ezfind 2.2

There are a few other meta-data I spotted "missing" while implementing eZ Find/Solr as a secondary/alternate storage layer/archive

But maybe you can get away with another field: "main_parent_node_id_si" and use that in a (single) filter list with all nodeid's of the folders?

hth

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Georg Franz

Tuesday 13 July 2010 8:45:00 am

Hi Paul,

that's a pitty.

I want to fetch an article - which have e.g. 9 locations - from a folder where a checkbox is set at the folder. But the folder can have a lot of sub folders (a whole tree). Probably the article is also located in one of these subfolders. So I can't use the main_node paramter in that case.

So a (relative and absolute) depth parameter would be fine. Also a parameter "fetch only the first location of an object" would be great :-)

Best wishes,
Georg.

--
http://www.schicksal.com Horoskop website which uses eZ Publish since 2004

Paul Borgermans

Tuesday 13 July 2010 2:04:34 pm

Ok, yes, in case of multiple node placements, the depth info is required. With function queries in the filter (which allow for about any math function on field values), you can then use it in a relative way as well.

Best regards

Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.