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.

eZ debug

Timing: Jan 18 2025 02:11:08
Script start
Timing: Jan 18 2025 02:11:08
Module start 'layout'
Timing: Jan 18 2025 02:11:08
Module start 'content'
Timing: Jan 18 2025 02:11:08
Module end 'content'
Timing: Jan 18 2025 02:11:08
Script end

Main resources:

Total runtime0.0155 sec
Peak memory usage4,096.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 591.2266152.6406
Module start 'layout' 0.00530.0031 743.867239.4922
Module start 'content' 0.00850.0048 783.359497.2734
Module end 'content' 0.01330.0022 880.632838.3047
Script end 0.0155  918.9375 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002717.6897140.0002
Check MTime0.00117.2919140.0001
Mysql Total
Database connection0.00084.865910.0008
Mysqli_queries0.002113.634530.0007
Looping result0.00000.167710.0000
Template Total0.001610.310.0016
Template load0.00095.562710.0009
Template processing0.00074.716610.0007
Override
Cache load0.00063.793610.0006
General
dbfile0.00031.863080.0000
String conversion0.00000.072340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs