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

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 10:16:39
Script start
Timing: Jan 18 2025 10:16:39
Module start 'layout'
Timing: Jan 18 2025 10:16:39
Module start 'content'
Timing: Jan 18 2025 10:16:40
Module end 'content'
Timing: Jan 18 2025 10:16:40
Script end

Main resources:

Total runtime0.8407 sec
Peak memory usage4,096.0000 KB
Database Queries74

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0071 587.9375152.6250
Module start 'layout' 0.00710.0039 740.562539.4453
Module start 'content' 0.01100.8281 780.0078689.0391
Module end 'content' 0.83920.0014 1,469.046916.1563
Script end 0.8406  1,485.2031 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.4038160.0002
Check MTime0.00130.1596160.0001
Mysql Total
Database connection0.00090.105010.0009
Mysqli_queries0.774992.1752740.0105
Looping result0.00070.0886720.0000
Template Total0.801895.420.4009
Template load0.00210.251320.0011
Template processing0.799795.122220.3998
Template load and register function0.00020.024510.0002
states
state_id_array0.00180.219710.0018
state_identifier_array0.00080.091020.0004
Override
Cache load0.00180.2152460.0000
Sytem overhead
Fetch class attribute can translate value0.00090.109450.0002
Fetch class attribute name0.00140.171980.0002
XML
Image XML parsing0.00120.142650.0002
class_abstraction
Instantiating content class attribute0.00000.002180.0000
General
dbfile0.00100.1166220.0000
String conversion0.00000.001340.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
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
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 30
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs