Search/Fetch Tree but with Text function

Author Message

Fabricio Guerrero

Monday 23 January 2006 10:08:30 am

Hi all,

Me here again.. my 3rd post today... easy to guess what i did all day...

We're coming down to final phases in developing a new client web site and now I've come accross customising the Adv. Search.

The client needs it to be Searchable on Attributes such as Categories, SubCategories, Type, Industry and so on... For which I've managed to do by creating a fetch on the 'content'`, 'tree functions.... but the client also wants the search to be further filtered on Text... Lets say a User wants a Article which contains the word "china", belonging to the Community Section, Industry Sector and so on... Is this possible some how?? to search text without using the fetch 'content', 'search'???

Up to now I see that the:

* 'content', 'search' function doesn't let you filter attributes
* 'content', 'tree' function doesn't let you search text....

my problem(as usual) is that i need a mix of both... is there a solution somehow.. or a patch/extension that lets this happen??

Here's the fetch as an alternative where i just filter all the Attributes which of course is not a good solution performance wise:

{let 
search_briefings=fetch( 'content', 'tree', hash( 'parent_node_id', ezhttp('SearchIssueNumber','get'),
class_filter_type, "include", class_filter_array, array(25),
attribute_filter, array(  'and', array( 'article_issue/title', 'like', '*' ), 
				        array( 'article_issue/short_title', 'like', '*' ),
					array( 'article_issue/short_intro', 'like', '*' ),
					array( 'article_issue/intro', 'like', '*' ),
					array( 'article_issue/body', 'like', '*' ),											array( 'article_issue/category', 'like', ezhttp('SearchContentCategory','get') ),
					array( 'article_issue/sub_category', 'like', ezhttp('SearchContentSubCategory','get') ),
					array( 'article_issue/story_type', 'like', ezhttp('SearchContentStoryType','get') ),
					array( 'article_issue/region', 'like', ezhttp('SearchContentRegion','get') ),
					array( 'article_issue/industry_sector', 'like', ezhttp('SearchContentIndustry','get') )),
							'sort_by', array( 'published', false() ),
							'offset', $view_parameters.offset,
							'limit', $numberOfObjects	
	))
}	

Thanks,
Fabricio

http://www.solobromasychistes.com <<Joomla Site :P
http://www.recipesforhealthyfood.com/ <<Drupal Site :P
http://www.ezforge.com/ <<future ezCommunity, Articles, forums and more...

steve walker

Tuesday 24 January 2006 10:15:53 am

Anyone got any ideas on this? We'd greatly appreciate it!

Cheers, Steve.

http://www.oneworldmarket.co.uk

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 19 2025 00:58:29
Script start
Timing: Jan 19 2025 00:58:29
Module start 'layout'
Timing: Jan 19 2025 00:58:29
Module start 'content'
Timing: Jan 19 2025 00:58:30
Module end 'content'
Timing: Jan 19 2025 00:58:30
Script end

Main resources:

Total runtime0.6864 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0063 589.2891152.6406
Module start 'layout' 0.00630.0036 741.929739.4766
Module start 'content' 0.00990.6752 781.4063526.9844
Module end 'content' 0.68510.0013 1,308.390612.1250
Script end 0.6864  1,320.5156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4601160.0002
Check MTime0.00130.1881160.0001
Mysql Total
Database connection0.00110.159510.0011
Mysqli_queries0.626391.2453540.0116
Looping result0.00050.0763520.0000
Template Total0.650494.720.3252
Template load0.00200.296020.0010
Template processing0.648394.448720.3242
Template load and register function0.00020.031210.0002
states
state_id_array0.00090.125310.0009
state_identifier_array0.00110.160520.0006
Override
Cache load0.00170.2429190.0001
Sytem overhead
Fetch class attribute can translate value0.00090.132520.0005
Fetch class attribute name0.00100.144430.0003
XML
Image XML parsing0.00821.201220.0041
class_abstraction
Instantiating content class attribute0.00000.001030.0000
General
dbfile0.00951.3808160.0006
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 12
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs