Forums / Developer / A more complex Search: How?

A more complex Search: How?

Author Message

PaoloMellerio kk

Monday 29 December 2003 4:55:16 am

Hi,

I've created a specific class for apartments which i must show on my site; among the others, in this class I've the Attribute "Area" (id:163), "Rooms" (id:164) and "Bathrooms" (id:165). The question is: is there a way to create a search engine which works in accordance with the values of these Attributes? That is to say it is possible to use a form to specify one value for the attribute "Area", one for the attribute "Rooms" and one for the attribute "Bathrooms ", and the search engine shows me the apartments which have "more or equal" the Area value specified in the form AND "more or equal" the number of Rooms value specified in the form AND "more or equal" the number of Bathrooms value specified in the form? In other words, is it possible to create a search on a class based on the values of three (or more) attribute_id of this class?

If yes, HOW?

THX in Advice

Paolo Mellerio (Clikka!com)

Paolo Mellerio
http://www.clikka.com

Marco Zinn

Monday 29 December 2003 8:40:52 am

oh-oh...
I think, you will to code a (search) extension for that.
While it should be easy to match for ONE attribute, i think, ez is not prepared to search for multiple attributes including logical operator handling ("more than"). I think, the search engine is trimmed for textual searches and does not know about the order of numbers.
The Template operator (http://ez.no/developer/ez_publish_3/documentation/customization/components/search/search_operator) defintly is not prepared to do this, but maybe the ezPublish classes (ezSearch::search) are able to help you. In any case, i think, you need some PHP coding for that.

Marco
http://www.hyperroad-design.com

Peter Szmulik

Monday 29 December 2003 3:17:26 pm

Hi Paolo

I'm trying to understand this myself for a similar need. My example would be similar to this:
http://uk.pricerunner.com/computing/computers/laptops/browse

Most of the attributes in the example are simple true/not true, but processor speed is not. I belive they solved this by saying processor speed between e.g. 900 and 1200MHz which means that this info (in one form or another) would need to be stored as an attribute in the object (presumably together with the actual speed to be displayed for the user).

I would be very grateful if someone could verify that this would not be totally wrong in eZ Publish :-)

Best Regards & Happy New Year to everyone!
Peter

eZ debug

Timing: Jan 30 2025 19:47:43
Script start
Timing: Jan 30 2025 19:47:43
Module start 'content'
Timing: Jan 30 2025 19:47:43
Module end 'content'
Timing: Jan 30 2025 19:47:44
Script end

Main resources:

Total runtime0.3767 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.9297370.2969
Module start 'content' 0.00700.0160 958.22661,001.5156
Module end 'content' 0.02300.3537 1,959.74223,890.4375
Script end 0.3767  5,850.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00481.2700200.0002
Check MTime0.00150.3872200.0001
Mysql Total
Database connection0.00060.147810.0006
Mysqli_queries0.271071.94001410.0019
Looping result0.00200.52791390.0000
Template Total0.353093.710.3530
Template load0.00090.229110.0009
Template processing0.352293.477310.3522
Override
Cache load0.00060.157110.0006
Sytem overhead
Fetch class attribute can translate value0.00150.391510.0015
XML
Image XML parsing0.00030.066610.0003
General
dbfile0.00531.4163200.0003
String conversion0.00000.001330.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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs