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

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

Main resources:

Total runtime0.0270 sec
Peak memory usage8,192.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0073 588.1328151.2109
Module start 'layout' 0.00730.0041 739.3438220.6953
Module start 'content' 0.01140.0133 960.03911,005.8984
Module end 'content' 0.02480.0022 1,965.937541.9766
Script end 0.0269  2,007.9141 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003212.0226140.0002
Check MTime0.00134.9951140.0001
Mysql Total
Database connection0.00103.782310.0010
Mysqli_queries0.004215.477230.0014
Looping result0.00000.037110.0000
Template Total0.00176.310.0017
Template load0.00124.597610.0012
Template processing0.00051.689810.0005
Override
Cache load0.00093.449310.0009
General
dbfile0.00103.834480.0001
String conversion0.00000.025640.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