Forums / Developer / Search/Fetch Tree but with Text function

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

eZ debug

Timing: Jan 19 2025 00:18:16
Script start
Timing: Jan 19 2025 00:18:16
Module start 'content'
Timing: Jan 19 2025 00:18:16
Module end 'content'
Timing: Jan 19 2025 00:18:16
Script end

Main resources:

Total runtime0.1609 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0094 587.8438180.8125
Module start 'content' 0.00940.0073 768.656394.0547
Module end 'content' 0.01670.1441 862.7109525.3750
Script end 0.1609  1,388.0859 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00362.2514200.0002
Check MTime0.00160.9642200.0001
Mysql Total
Database connection0.00070.432510.0007
Mysqli_queries0.114270.98381410.0008
Looping result0.00130.79471390.0000
Template Total0.143789.310.1437
Template load0.00100.628810.0010
Template processing0.142788.658910.1427
Override
Cache load0.00070.460510.0007
Sytem overhead
Fetch class attribute can translate value0.00080.481710.0008
XML
Image XML parsing0.00040.236010.0004
General
dbfile0.00362.2100200.0002
String conversion0.00000.005830.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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