Forums / Developer / class filtering with ezfind

class filtering with ezfind

Author Message

Yaseen Carim Bacor

Thursday 17 February 2011 4:24:19 am

Hi,

I am trying to make a search in sub classes of my ezp project.

I do add the following line in the search.tpl, ezfind fetch function section.

'class_id', array(38, 39, 40)

but it is not working.

Can anyone help me?

Thanks in advanced.

Yaseen

Yaseen Carim Bacor

Thursday 17 February 2011 9:13:36 pm

Actually my problem is that i have 3 main classes connected to 3 tpls. This part is being index well with the ezfind. The problem arises with 3 other sub-classes connected to another 3 tpls.

When i make a search all result for the 3 main classes are being return.

But not the 3 subclasses.

The 3 main tpls contain links to the sub tpls.

Can anyone help?

In this situation is the 'class_id', array(38, 39, 40) applicable

Thanks

Yaseen

Marko Žmak

Thursday 17 February 2011 11:26:31 pm

You should also include the "sub-classes" in the class_id parameter. For example, like this:

'class_id', array(38, 39, 40, 41, 42, 43)

where 41, 42, 43 are the class ID's of your "sub-classes".

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Yaseen Carim Bacor

Friday 18 February 2011 12:04:37 am

Dear Marko Zmak,

Thank you for the reply.

I have already tried the solution but it is not working.

I have made the changes in extension/ezfind/design/standard/templates/content/search.tpl and extension/ezfind/design/ezwebin/templates/content/search.tpl.

I am using the default ezwebin template.

Thanks

Yaseen

Marko Žmak

Friday 18 February 2011 3:00:09 am

Few things to check:

  • see if all the classes you search for are set to be searchable
  • see if the attributes of the classes are set to be searchable
  • does the anonymous have the permissions to read all the classes (can you open the objects of this classes in frontend?)
  • are the nodes of this "sub-classes" maybe hidden?
  • are the objects of the "sub-classes" really indexed in ezfind? (do you get them in the search results when doing search in the admin interface?)

And you should make changes only in extension/ezfind/design/ezwebin/templates/content/search.tpl, but first check if this is really the template that is used.

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Yaseen Carim Bacor

Friday 18 February 2011 4:59:56 am

Ok Marko Zmak,

It is now working fine. Except for telephone number. Generally telephone number contains spaces. So with space it do not return the result.

If i remove the space it work fine.

Can you please tell me, how i can modify the tpl to use space?

Yaseen

Marko Žmak

Friday 18 February 2011 5:48:59 am

I don't quite understand your question about the spaces.

Could you clarify a little bit what exactly is the problem with the spaces?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

Yaseen Carim Bacor

Sunday 20 February 2011 9:44:40 pm

The telephone number with space it does not work.

For example telephone number like 476264726, is OK but like 47 62 64 726. Not ok

I have tried to make some modification with this function in serach.tpl but it does not work.

function ezfTrim( str ) { return str.replace(/^\s+|\s+$/g, '') ; }

Can you please help?

Thanks

Yaseen Carim Bacor

Monday 21 February 2011 3:46:55 am

The problem was with ezfind 2.1.

When i upgrade to ezfind 2.2.

It work fine.

Thanks

eZ debug

Timing: Jan 18 2025 01:59:53
Script start
Timing: Jan 18 2025 01:59:53
Module start 'content'
Timing: Jan 18 2025 01:59:54
Module end 'content'
Timing: Jan 18 2025 01:59:54
Script end

Main resources:

Total runtime1.1908 sec
Peak memory usage4,096.0000 KB
Database Queries212

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 588.7031180.8438
Module start 'content' 0.00511.0297 769.5469607.9609
Module end 'content' 1.03490.1558 1,377.5078341.0625
Script end 1.1907  1,718.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00390.3262210.0002
Check MTime0.00150.1228210.0001
Mysql Total
Database connection0.00060.049010.0006
Mysqli_queries1.095091.95992120.0052
Looping result0.00220.18312100.0000
Template Total1.158697.320.5793
Template load0.00170.145420.0009
Template processing1.156997.152120.5784
Template load and register function0.00020.012710.0002
states
state_id_array0.00080.067010.0008
state_identifier_array0.00400.334320.0020
Override
Cache load0.00160.1330650.0000
Sytem overhead
Fetch class attribute can translate value0.00170.145230.0006
Fetch class attribute name0.00110.0916100.0001
XML
Image XML parsing0.00110.093030.0004
class_abstraction
Instantiating content class attribute0.00000.0025120.0000
General
dbfile0.00820.6875290.0003
String conversion0.00000.000330.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
9content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 26
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs