How to use facet with multiprice datatype?

Author Message

Nguyen Tien Hy

Friday 02 January 2009 1:49:28 am

I have read ezfind_1.1_manual.pdf.

I want to apply "a filter is specified by
<class_identifier>/<class_attribute>[/<sub_structure]:<value>." to filter product objects (price attribute is multiprice datatype). How to do it?

Question 1: Can I use "fetch( ezfind, search,hash( query, 'eZ Systems',filter, 'product/price/XXX:100000' ) )" ?
Question 2: If yes, XXX = ???
Question 3: If not, could I write some code for ezmultiprice in php to solve it?

Help me! Thanks!

Paul Borgermans

Thursday 08 January 2009 11:43:11 am

Can you file a bug report in the ez find issue tracker?

Thanks
Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Nguyen Tien Hy

Thursday 15 January 2009 7:59:43 pm

I don't push a bug. I like to filter products by price range.

I filtered objects of product class ProductA by using facet/filter. Price datatype of ProductA is ezprice. Everything OK.

But when I filteredz objects of product class ProductB. Price datatype of ProductB is ezmultiprice, everything it not OK.

I see in ezfind.ini as follows:

"
[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

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

# Default field type
Default=text
"

<i>DatatypeMap[ezprice]=sfloat</i>. So <i>DatatypeMap[ezmultiprice]=???</i>.

Some more php codes are needed?

Help me! Thanks.

Nguyen Tien Hy

Thursday 12 March 2009 6:54:02 am

I need to search my product objects that match the product price (multiprice datatype) in the range (from min_price to max_price).

How to do that?

Paul Borgermans

Monday 16 March 2009 4:36:16 pm

That is not possible right now, due to the (too simple) indexing of the multi-price datatype

I crteated an enhancement issue for that

Best regards
Paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Mark Marsiglio

Monday 27 July 2009 8:50:41 pm

Paul - can you comment on whether or not the ezfind fetch filter works with the price datatype? My guess is no based on the fact that the price datatype does not support search (is searchable is disabled).

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

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

Main resources:

Total runtime0.4639 sec
Peak memory usage4,096.0000 KB
Database Queries70

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0065 588.0781152.6406
Module start 'layout' 0.00650.0021 740.718839.4922
Module start 'content' 0.00860.4538 780.2109621.1406
Module end 'content' 0.46250.0014 1,401.351616.1172
Script end 0.4638  1,417.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.6888160.0002
Check MTime0.00130.2736160.0001
Mysql Total
Database connection0.00110.244910.0011
Mysqli_queries0.403586.9951700.0058
Looping result0.00060.1278680.0000
Template Total0.435193.820.2175
Template load0.00190.416120.0010
Template processing0.433193.372020.2166
Template load and register function0.00010.028210.0001
states
state_id_array0.00080.172710.0008
state_identifier_array0.00070.156920.0004
Override
Cache load0.00170.3717580.0000
Sytem overhead
Fetch class attribute can translate value0.00070.154130.0002
Fetch class attribute name0.00090.188280.0001
XML
Image XML parsing0.00100.216930.0003
class_abstraction
Instantiating content class attribute0.00000.002990.0000
General
dbfile0.00090.1835220.0000
String conversion0.00000.001540.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
13content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
7content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs