Exclude on the search engine some class

Author Message

justin kazadi

Thursday 04 June 2009 1:58:16 am

Hi,

i'am using Ez 4.0.1 . i want to including on the search engine somme content class so i have using this code :

{def $search=fetch('content', 'search',
                      hash('text', $search_text,                           
			                     'class_id', array( '46', '16', '50', '51', '70', '57', '56' ),
                           'offset', $view_parameters.offset,
                           'limit', $page_limit))}

but the search engine search all the content class.

i don't know if is there an mistakes on my code.

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

Ivo Lukac

Thursday 04 June 2009 7:17:18 am

You should have something like this in site.ini:

[SearchSettings]
SearchViewHandling=template

http://www.linkedin.com/in/ivolukac
http://www.netgen.hr/eng/blog
http://twitter.com/ilukac

justin kazadi

Friday 05 June 2009 12:29:45 am

Thanks i'm gonna try it.

The theory is when we know everything and nothing works.
The practice is when everything works and nobody knows why.
If the practice and theory are met, nothing works and we do not know why.

Albert Einstein

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

Main resources:

Total runtime0.0211 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.0048 588.2500151.2266
Module start 'layout' 0.00480.0038 739.4766220.7188
Module start 'content' 0.00850.0111 960.1953997.8359
Module end 'content' 0.01960.0015 1,958.031333.9922
Script end 0.0211  1,992.0234 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002411.1786140.0002
Check MTime0.00104.9231140.0001
Mysql Total
Database connection0.00073.220810.0007
Mysqli_queries0.003014.370130.0010
Looping result0.00000.032710.0000
Template Total0.00115.210.0011
Template load0.00083.872410.0008
Template processing0.00031.258110.0003
Override
Cache load0.00062.680810.0006
General
dbfile0.00021.096980.0000
String conversion0.00000.023740.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