Forums / Extensions / eZ Find / How to use facet with multiprice datatype?

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

eZ debug

Timing: Jan 18 2025 03:05:36
Script start
Timing: Jan 18 2025 03:05:36
Module start 'content'
Timing: Jan 18 2025 03:05:36
Module end 'content'
Timing: Jan 18 2025 03:05:37
Script end

Main resources:

Total runtime0.8138 sec
Peak memory usage4,096.0000 KB
Database Queries207

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0093 589.0078180.7578
Module start 'content' 0.00930.6637 769.7656626.2344
Module end 'content' 0.67290.1408 1,396.0000337.0469
Script end 0.8138  1,733.0469 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5034210.0002
Check MTime0.00140.1733210.0001
Mysql Total
Database connection0.00090.114610.0009
Mysqli_queries0.721588.65002070.0035
Looping result0.00270.32992050.0000
Template Total0.777095.520.3885
Template load0.00160.194020.0008
Template processing0.775495.274420.3877
Template load and register function0.00030.032810.0003
states
state_id_array0.00120.151910.0012
state_identifier_array0.00200.249520.0010
Override
Cache load0.00140.1746580.0000
Sytem overhead
Fetch class attribute can translate value0.00170.203540.0004
Fetch class attribute name0.00160.198180.0002
XML
Image XML parsing0.00140.176640.0004
class_abstraction
Instantiating content class attribute0.00010.006790.0000
General
dbfile0.00550.6766330.0002
String conversion0.00000.001630.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
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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 31
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs