Forums / Extensions / eZ Find / eZ Find 2.0 - Sort_by( )

eZ Find 2.0 - Sort_by( )

Author Message

cristine barbot

Wednesday 27 May 2009 3:04:42 am

Salut ,

j 'ai arrivé d'installer et utiliser eZ Find 2.0 ,le seul soucis que j'ai ,c'est de tri(Sort_by),
le tri s'effectuer sur les noeds et ne prend pas en considération ce qu' il est défini dans la fonction de recherche .

$tri = nom or ville or code_postal ...

{set $search=fetch( ezfind,search,
hash( 'query', cond(and(ezhttp_hasvariable('SearchText'), ne(ezhttp('SearchText'), '')), concat('"',ezhttp('SearchText','post'),'"'), '[* TO *]'),
'offset', $offset,
'limit', $page_limit,
'sort_by', hash(concat('attr_',$tri,'_t'),asc),
'filter', $filter,
'facet', $facetArray,
'class_id', $class_identifier ))}

quelqu'un a déjà avoir ce type problème (sort_by)

Merci,

Hans von Goering

Thursday 02 July 2009 12:29:19 am

you french people!
Cant you just write in English!

Thanks
HvG

Jean-Luc Nguyen

Friday 03 July 2009 2:47:02 am

Yes, you freaky french people!

http://www.acidre.com

Max Keil

Wednesday 15 July 2009 6:13:43 pm

Hi Cristine,

do you try to sort by an class-attribute-identifer?

'sort_by', hash(concat('attr_',$tri,'_t'),asc),

the strings "attr_" and "_t" will automatically be added by ezfind because of the getFieldName function. You should prepend the class_identifier:

'sort_by', hash( concat( $class_identifier, '/', $attribute_identifier ), asc )

example:

'sort_by', hash( 'product/name', asc )

Mit freundlichen Grüßen
Best regards

Max Keil

____________________________________________________________
eZ Publish Gold Partner - http://www.all2e.com
http://ez.no/partners/worldwide_partners/all2e_gmbh

Vincent Tabary

Tuesday 25 August 2009 6:03:36 am

Hi,

I think I have the same problem. With Google, I do not really find something.

But in the tracker for eZFind, this ticket : http://issues.ez.no/IssueView.php?Id=15164 seams to match with our problem.

Unfortunately, it is not resolved...

Maybe there is a solution like to remove or to replace specials characters before indexing (to replace ä with a, "-" with " ", ...)

Vinz
http://vincent.tabary.me

Vincent Tabary

Wednesday 26 August 2009 7:26:22 am

Hi all,

I think I have a solution. Well, it worked for me.

In the ezfind extension, there is a lack in the setting file "settings/ezfind.ini".

Here is the modified category of my file :

[SolrFieldMapSettings]
# List of custom datatype mapping. eZ Publish datatype string is used
# as key, and the value if the name of the class to use.
#
# Example:
# CustomMap[eztext]=ezfSolrDocumentFieldText
CustomMap[ezobjectrelation]=ezfSolrDocumentFieldObjectRelation
CustomMap[ezobjectrelationlist]=ezfSolrDocumentFieldObjectRelation
CustomMap[ezxmltext]=ezfSolrDocumentFieldXML
CustomMap[ezmatrix]=ezfSolrDocumentFieldXML

# Datatype to field type map.
#
# Example:
DatatypeMap[ezstring]=string
DatatypeMap[eztext]=text
DatatypeMap[ezboolean]=boolean
DatatypeMap[ezdate]=date
DatatypeMap[ezdatetime]=date
DatatypeMap[ezfloat]=sfloat
DatatypeMap[ezinteger]=sint
DatatypeMap[ezprice]=sfloat
DatatypeMap[eztime]=date

# Default field type
Default=text

The only difference with the initial file is the line :

DatatypeMap[ezstring]=string

I'll try to add this to the ticket :)

Vinz
http://vincent.tabary.me

eZ debug

Timing: Jan 18 2025 02:49:24
Script start
Timing: Jan 18 2025 02:49:24
Module start 'content'
Timing: Jan 18 2025 02:49:25
Module end 'content'
Timing: Jan 18 2025 02:49:25
Script end

Main resources:

Total runtime0.6830 sec
Peak memory usage4,096.0000 KB
Database Queries211

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 587.7344180.7891
Module start 'content' 0.00600.5429 768.5234694.1172
Module end 'content' 0.54890.1339 1,462.6406340.4297
Script end 0.6829  1,803.0703 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.6039210.0002
Check MTime0.00160.2373210.0001
Mysql Total
Database connection0.00070.107610.0007
Mysqli_queries0.598287.58212110.0028
Looping result0.00220.32342090.0000
Template Total0.657396.220.3286
Template load0.00220.324320.0011
Template processing0.655095.909520.3275
Template load and register function0.00020.030310.0002
states
state_id_array0.00030.037510.0003
state_identifier_array0.00150.223720.0008
Override
Cache load0.00190.2738460.0000
Sytem overhead
Fetch class attribute can translate value0.00140.203260.0002
Fetch class attribute name0.00130.195280.0002
XML
Image XML parsing0.00220.317160.0004
class_abstraction
Instantiating content class attribute0.00000.002280.0000
General
dbfile0.00280.4095330.0001
String conversion0.00000.001030.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0004 secs