fetch content against multiple keywords

Author Message

Sylvain Gogel

Friday 04 December 2009 1:29:35 pm

How can i fetch 10 content nodes against multiple keywords (with an OR)?

The fetch content keyword operator does not looks like supporting this feature

<span class="line">fetch( 'content',  'keyword',</span>
<span class="line"> hash( 'alphabet',            alphabet,</span>
<span class="line">     [ 'strict_matching',     strict_matching,    ]</span>
<span class="line">     [ 'classid',             classid,            ]</span>
<span class="line">     [ 'offset',              offset,             ]</span>
<span class="line">     [ 'limit',               limit,              ]</span>
<span class="line">     [ 'owner',               owner,              ]</span>
<span class="line">     [ 'parent_node_id',      parent_node_id,     ]</span>
<span class="line">     [ 'include_duplicates',  include_duplicates, ]</span>
<span class="line">     [ 'sort_by',             sort_by             ] ) )</span>

thanks

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

Bertrand Dunogier

Saturday 05 December 2009 4:19:44 am

Simple answer: use eZ find. You could also perfectly do it with a custom fetch function, I think, but the result would be better, to the cost of less performances, using eZ find.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Sylvain Gogel

Tuesday 08 December 2009 1:31:48 pm

Good hint, i switch my original design to use moreLikeThis fetch, handy fast and kewl ^^

Anyway Tagcloud are lame ^^

--
http://www.ecedi.fr
Agence Web, Créa/Conseils, Accessibilité
eZPublish, Drupal, Zend, Symfony

yunxia cai

Thursday 10 December 2009 12:33:59 am

I want to ask a question .Do you know ez Technical Manual?

I want to download.

Thanks!

Gaetano Giunta

Thursday 10 December 2009 12:57:07 am

@Yunxia: http://ez.no/doc - you can download pdf versions on that page

Principal Consultant International Business
Member of the Community Project Board

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

Main resources:

Total runtime0.6478 sec
Peak memory usage4,096.0000 KB
Database Queries67

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 591.2109152.6406
Module start 'layout' 0.00540.0030 743.851639.4766
Module start 'content' 0.00830.6380 783.3281647.9844
Module end 'content' 0.64630.0014 1,431.312516.1406
Script end 0.6478  1,447.4531 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5184160.0002
Check MTime0.00130.2024160.0001
Mysql Total
Database connection0.00070.108110.0007
Mysqli_queries0.593091.5430670.0089
Looping result0.00050.0836650.0000
Template Total0.612094.520.3060
Template load0.00200.315820.0010
Template processing0.610094.155720.3050
Template load and register function0.00010.014410.0001
states
state_id_array0.00130.208210.0013
state_identifier_array0.00100.153120.0005
Override
Cache load0.00170.2567230.0001
Sytem overhead
Fetch class attribute can translate value0.00060.092040.0001
Fetch class attribute name0.00120.181490.0001
XML
Image XML parsing0.00220.344040.0006
class_abstraction
Instantiating content class attribute0.00000.0025100.0000
General
dbfile0.00200.3101340.0001
String conversion0.00000.001440.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs