views:

90

answers:

3

As programmers, we are all aware of the differences between AND and OR (junction and union). I'm building a website that list properties and I'm really struggling on the search part. I want the user to be able to search using checkbox, but some criteria make more sense using AND and other using OR.

For example, show properties that have "4 bedrooms AND 2 bathrooms" and "near downtown OR near a bus transit".

Usually search are only junction (like Google), or they actually explain the use of AND or OR. But since my target audience is very broad, I'm looking for simple visual indicator that could be understood by any person, not those only mathematically inclined :).

+1  A: 

I believe (most of) the users understand that when the:

<select>
  <option>...
  <option>...
</select>

is used, then all items are taken with OR.

I guess the natural way to have AND selections is to have a group of check-boxes.

Grzegorz Oledzki
But you can't know ahead of time which things to add to an options list. It's also possible to be downtown AND near a bus transit. The AND/OR option would be up to the user.
Bill the Lizard
Hmm... I didn't have that impression when reading the question. Let Eldimo tell what (s)he thinks about it.
Grzegorz Oledzki
Actually, we did some hallway testing and some user thought check-boxes were OR and some users thought were AND. That's what prompted the question :)
Thierry-Dimitri Roy
+1  A: 

When users select their options, You could simultaneously (ajaxly) write down a phrase in plain english.

This will allow the users understand you interface quite rapidly.

HeDinges
It wouldn't have to be 'ajaxly', 'javascriptly' would be enough
Grzegorz Oledzki
+4  A: 

Why not just have your list of options and then have a checkbox that says 'Contains any of the above' (Or) and 'Contains all of the above' (And)

So:

 [ ] Option 1
 [X] Option 2
 [X] Option 3

[X]Contains all [ ] Contains any

This is a pretty simple way to convey and/or searching without getting too caught up in the logic behind it.

samoz
I would prefer a system where the user can mismatch AND and OR
Thierry-Dimitri Roy
What do you mean?
samoz
Allow the user to say "option 1 AND (option 2 OR option 3)"
Thierry-Dimitri Roy
You can do this, I guess I just wasn't clear in my answer. Provide a checkbox by each option. I'll edit the post accordingly.
samoz