Modify ez search by class-relevance

Author Message

K259

Tuesday 19 July 2005 1:48:16 am

How is it possible to first list articles, then folder titles, then link titles with the ez search eninge?

I want to index all classes and attribs, but in my case articles are more relevant than folder titles etc, so I want this to be listed on top..

Easy to achieve this with eZ p?

K259

Tuesday 19 July 2005 2:33:12 am

Or is it possible to sort by class in the fetch? But how? Anyone have ideas?

David Eriksson

Tuesday 19 July 2005 4:37:38 am

http://ez.no/doc/ez_publish/technical_manual/3_6/reference/modules/content/fetch_functions/list

sort_by, array('class_name', true())

That will sort it by class name. It'll still be a problem if you want <b>F</b>olders to come before <b>A</b>rticles but after <b>C</b>omment though...

In which case the only way I can think off is to fetch them one class at a time, alternatively all at once and then loop through one class at a time.

/David

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 18 2025 18:29:13
Script start
Timing: Jan 18 2025 18:29:13
Module start 'layout'
Timing: Jan 18 2025 18:29:13
Module start 'content'
Timing: Jan 18 2025 18:29:13
Module end 'content'
Timing: Jan 18 2025 18:29:13
Script end

Main resources:

Total runtime0.0161 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.9375152.6250
Module start 'layout' 0.00590.0024 740.562539.4453
Module start 'content' 0.00840.0057 780.007889.2578
Module end 'content' 0.01400.0020 869.265630.3047
Script end 0.0160  899.5703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002918.3329140.0002
Check MTime0.00137.8993140.0001
Mysql Total
Database connection0.00085.081910.0008
Mysqli_queries0.002012.583830.0007
Looping result0.00000.093410.0000
Template Total0.00159.610.0015
Template load0.00085.080410.0008
Template processing0.00074.447210.0007
Override
Cache load0.00053.358710.0005
General
dbfile0.00042.262980.0000
String conversion0.00000.044540.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