Forums / Extensions / eZ Find / content(ezfind, search) and extended attribute filter

content(ezfind, search) and extended attribute filter

Author Message

Sylvain Gogel

Wednesday 25 March 2009 2:16:04 am

Is it possible to mix the new ezfind, search fetch function with an existing extended attribute filter?

btw ezfind, search does not have the 'publish_date' parameter in his hash, which is bad.
I always struggle between using (ezfind, search) and (content, search)

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

Sylvain Gogel

Thursday 26 March 2009 8:32:33 am

Reading EzFind 2.0 doc i found this

filter
The filter is used when creating faceted search templates for drill-down navigation. Filters
are used to limit the search result set without altering the relevancy sort order. Facet
results contain filter definitions that can be used directly. Custom filter definitions can also
be created.
A filter is specified by

<class_identifier>/<class_attribute>[/<sub_structure]:<value>. The
filter option may be a string or list of strings.

Unfortunaltly there is no exemple with sub_structure, can it allow to got throu an object relation?

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

Sylvain Gogel

Tuesday 31 March 2009 5:03:20 am

No one knows how to filter by object relations then?

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

Sylvain Gogel

Tuesday 31 March 2009 8:17:14 am

I finaly find out how to filter by a relation

{def $theme_node= fetch('content', 'node', hash('node_id', $search_theme_node_id))}

then add

'filter', concat('news/themes:',$theme_node.name)

Notice that themes is a object relation list attribute!!
Yata.

Now how can i filter on multiple classes at the same time:

'filter', array( 'or', 											concat('article/theme:',$theme_node.name),													concat('diaporama/theme:',$theme_node.name),
concat('news/theme:',$theme_node.name),
concat('folder/theme:',$theme_node.name),
concat('publication/theme:',$theme_node.name),
concat('quizz/theme:',$theme_node.name)
)

Does not look to work

(no filtering at all, it's like i'm not doing filter at all :( )
Should i mix that with class id?

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

Emmanuel Courmont

Wednesday 01 April 2009 6:47:24 pm

Hi Sylvain,

If you use an 'or' condition you may need to put your condition strings in an <b>array</b>.
Something similar to the example on page 16 of the ezfind2.0 documentation (http://ez.no/doc/extensions/ez_find)

try this:

'filter', array( 'or',
array( concat('article/theme:',$theme_node.name) ),
array( concat('diaporama/theme:',$theme_node.name) ),
array( concat('news/theme:',$theme_node.name) ),
array( concat('folder/theme:',$theme_node.name) ),
array( concat('publication/theme:',$theme_node.name) ),
array( concat('quizz/theme:',$theme_node.name) )
)

Hope it solves your pb.

eZ debug

Timing: Jan 29 2025 23:44:33
Script start
Timing: Jan 29 2025 23:44:33
Module start 'content'
Timing: Jan 29 2025 23:44:33
Module end 'content'
Timing: Jan 29 2025 23:44:33
Script end

Main resources:

Total runtime0.1206 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 588.2031180.7578
Module start 'content' 0.00540.0041 768.960999.1484
Module end 'content' 0.00950.1110 868.1094527.9219
Script end 0.1206  1,396.0313 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00282.3022200.0001
Check MTime0.00121.0140200.0001
Mysql Total
Database connection0.00070.599310.0007
Mysqli_queries0.080166.42061410.0006
Looping result0.00100.83161390.0000
Template Total0.110891.810.1108
Template load0.00070.551310.0007
Template processing0.110191.283110.1101
Override
Cache load0.00040.348310.0004
Sytem overhead
Fetch class attribute can translate value0.00060.512310.0006
XML
Image XML parsing0.00030.218810.0003
General
dbfile0.00665.4809200.0003
String conversion0.00000.005130.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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