Michael von Aichberger <[EMAIL PROTECTED]> wrote: > How do I get the user to formulate his query?
Hi Michael, I think this depends on the sophistication of the users that your project is aimed at. For casual users you might have four fields: FEATURE Image MUST show at least one of the following: _________________ _________________ |*a cat | | a cat | |*a dog | | a dog | | a human | |_______________| |*mostly yellow | Image MUST be: | mostly blue | _________________ | mostly red | | mostly yellow | | | | | | | |_______________| | | Image MUST NOT: | | _________________ | | | | | | | | |_______________| |_______________| Users could drag features from the fields on the left into the mutually exclusive fields on the right (the asterisk in my diagram indicates that the item is greyed out and cannot be chosen again. > But what about more complex wishes like > > (((dog OR cat) AND yellow) OR (cat AND blue)) OR ((humans AND cats) AND > Green) With this four-field system, you could not formulate such a complex query in a single-pass. You could, however, allow the user to run several searches, and either refine the search by only selecting from within the current set of matches (AND) or extend it by adding the results of the new search to the current set of matches (OR). You could have buttons such as: [New search (replace current selection)] [ Add results to current selection ] [ Search in current selection ] Regular users may be willing to learn to handle a more complicated interface, where they can create such sub-selections directly. Here's a possibility which uses a dynamic display of popup menus: Your original query: Show images which [MUST show ] [a cat ] [OR ] [MUST show ] [a dog ] [AND ] [MUST be ] [mostly yellow] [FURTHER CRITERIA... ] Your complex query: Show images which [MUST show ] [a cat ] [AND ] [MUST NOT be] [mostly green ] [AND ALSO IMAGES WHICH] [MUST show ] [a dog ] [AND ] [MUST be ] [mostly yellow] [AND ALSO IMAGES WHICH] [MUST show ] [a human ] [AND ] [MUST show ] [a cat ] [AND ] [MUST be ] [mostly green ] [FURTHER CRITERIA... ] Note that I have grouped (cat AND yellow) and (cat AND blue) together into (cat AND NOT green). In other words, this interface provides for a number of different ways of formulating the same request, some of which may be more efficient than others in performing the first operation. If your project is for a wide audience, you might like to include both interfaces. Cheers, James [To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]