Forums / Developer / Complex Multiple Field Search

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?