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.