Complex Multiple Field Search

Author Message

Willie Seabrook

Sunday 12 October 2003 10:54:50 pm

Hi,

What would be the best way to provide the following functionality on my website:

I have quite a complex class that has many fields. Many of these fields are multi selectable enums.

In my search page I have a form that matches field by field the input of the class.

The search results need to return all objects that match the specified input. You can be as specific (every field) or as vague (no fields = return all objects) as you want to be in the search.

Many fields are multiple selects so for example. Select all widgets with

title: Test
enumfield: One, Two or Three (multi select)

The first problem in accomplishing this is the fact that the attribute filter doesn't work in the latest version
(see http://www.ez.no/developer/ez_publish_3/forum/general/attribute_filter_doesnt_work)

The second is that ezenv appears to not be able to handle array environment variables ie

urlblabla/content/view/777?enumField=One&enumField=Two&enumField=Three

just returns Three as its result.

ezsearch does not also come anywhere near to accomplishing the sort of functionality I need. What would be the best way to approach this problem?

Regards,
Willie

Eirik Alfstad Johansen

Monday 13 October 2003 1:11:15 am

Hi Willie,

Regarding the handling of array variables, try adding a [] after the var name, like this:

urlblabla/content/view/777?enumField[]=One&enumField[]=Two&enumField[]=Three

I don't know if that will make it work, but at least then you are specifing array variables and not overriding existing variables.

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Willie Seabrook

Monday 13 October 2003 3:48:01 pm

The form data is submitted via http post so I have no control over that I think... unless i specify the variable on the multi select box to be enumField[] instead? That wouldn't make any difference would it?

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

Main resources:

Total runtime1.7490 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0078 589.3438152.6250
Module start 'layout' 0.00780.0040 741.968839.4453
Module start 'content' 0.01181.7358 781.4141535.7500
Module end 'content' 1.74760.0014 1,317.164112.4766
Script end 1.7490  1,329.6406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.1937160.0002
Check MTime0.00140.0823160.0001
Mysql Total
Database connection0.00120.070010.0012
Mysqli_queries1.675995.8217570.0294
Looping result0.00050.0310550.0000
Template Total1.710297.820.8551
Template load0.00230.131620.0012
Template processing1.707997.647720.8539
Template load and register function0.00030.016410.0003
states
state_id_array0.00070.042410.0007
state_identifier_array0.00170.099220.0009
Override
Cache load0.00190.1101310.0001
Sytem overhead
Fetch class attribute can translate value0.00100.056320.0005
Fetch class attribute name0.00110.065540.0003
XML
Image XML parsing0.00100.059120.0005
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00080.0471160.0001
String conversion0.00000.000440.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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/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
1content/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: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs