Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

So lets say I am implementing a searcher that people would use to check fantasy football teams and their roster (a fantasy football team can have 8-12 players that each user selects from all of the available players in the NFL, thus you could have players who exist on the same NFL team or different NFL teams on your roster)

so lets say i want to see all the teams that have

(Ben Tate && Arian Foster) || (Adrian Peterson && Toby Gehert)

where && = and, || = or

i.e., the user wants to see teams where people commonly handcuff one player with their backup (ie Foster & Tate are on the same team, Peterson & Gehert are on the same team).

If they have no knowledge of && and OR whats a way where you could illustrate that a search like this was possible to them?

  • if someone of 300 rep could create the AND and OR tags to this that would be appreciated
share|improve this question
2  
I added boolean-search tag for you. –  DA01 Sep 11 '13 at 23:30
    
@DA01 Oh well. I tried. I wish there was a way of getting a list of tags. –  Andrew Leach Sep 12 '13 at 7:06
2  
A lot of people are really bad at understanding formal logic things - I'd try to represent it graphically (maybe with Venn Diagrams) –  PhillipW Sep 12 '13 at 9:47
1  
@AndrewLeach Ta da! –  AakashM Sep 12 '13 at 9:48
    
thank for adding that @DA01 –  Bob Sinclar Sep 12 '13 at 14:06
show 3 more comments

5 Answers

up vote 8 down vote accepted
  • Any of the following instead of OR.
  • All of the following instead of AND.
  • Use a combination of brackets and indentation for nesting the two.
  • Provide a tooltip with examples.
share|improve this answer
    
"any" and "all" look too similar in that phrase, the difference would be subtle for an average user. I would be cautious with using those. –  Austin Henley Sep 12 '13 at 3:42
    
I completely agree with 'Any' and 'All' instead of AND and OR. In my experience, indentation works much better than brackets. Indentation limits the available space as terms become more nested but it is unlikely anybody will create a query with terms nested 3 deep. Most people do not understand a query that complex nor would they create one. More than likely, they will create a more shallow query with redundant terms. –  user1757436 Sep 12 '13 at 12:26
add comment

This is, to say the least, something of a power feature, but OS X implements it thusly:

Boolean search operators in OS X

By default adding additional search criteria simply adds another row to the list (and they're each treated as AND filters).

If you hold the Option key while clicking the + button, it adds a boolean search row and one more search row nested beneath it.

In this way, users can nest boolean operators (that first drop-down can be set to "All", "Any" or "None").

It's a bit convoluted, but it can effectively represent any search logic you like. For instance, here's a more complex example (as per your comment), of A && B && (C || D):

More complex example demonstrating the nesting of boolean search filters

share|improve this answer
    
This is what I meant, except that the example does not include deeper levels e.g. A AND B AND (C OR D). –  Danny Varod Sep 12 '13 at 14:20
    
@DannyVarod I've updated the answer to demonstrate exactly that, though it's worth pointing out that the top-most filter (the "All of the following are true" row) is implicit if it's not there. –  Kit Grose Sep 12 '13 at 15:33
    
Much better. The previous example also did not make sense mathematically. –  Danny Varod Sep 12 '13 at 15:38
    
awesome example thanks –  Bob Sinclar Sep 16 '13 at 13:59
add comment

I would try and replicate natural language as closely as possible:

mockup

download bmml source – Wireframes created with Balsamiq Mockups

share|improve this answer
    
+1 for the bmml , I am also using Balsamiq –  Bob Sinclar Sep 12 '13 at 14:09
add comment

I can think of three options:

  • Include a (advance?) search examples link;
  • Show some search examples in a tooltip on focus;
  • Include a greyed text in the search field with and example (notice that often these come to replace labels, so may not be an ideal solution).

I would be inclined to pick the first option, but that depends on how likely people are to return to the site (repeating hints and labels are annoying once learnt, although in the case of a tooltip you can add 'don't show again' message), and how urgent it is for you that people know this.

Both the first two options are shown here:

a screenshot of wolfram alpha showing an examples link and a tooltip

And the last one here:

An image showing the iCloud Login Form

share|improve this answer
add comment

I would just use the words "and" and "or". Many programming languages use these instead of the more mathematical looking symbols like "&" and "|", in fact the query language SQL uses "AND" and "OR" (it sounds like you might be creating a query language here). Expressions built with the words "and" and "or" would be much more understandable by a larger group of people than those using alternative symbols.

You could require they be capitalized to make them stand out more as boolean operators and make the parsing of the expressions a little easier.

(Ben tate AND Arian Foster) OR (adrian peterson AND toby gehert)

Almost anyone can understand that and it should be explainable with just a few examples.

share|improve this answer
5  
Only use AND and OR if the targeted user group knows Boolean logic. Otherwise avoid those terms. There is a body of research on this problem showing most people misinterpret the function of AND and OR in queries. See this paper as an example of this research. Having worked on this problem for many years, we've chosen a variation Danny's. In ours the user chooses Match All or Match Any before specifying the variables, operators, and values. Match All = AND Match Any = OR This works better than any AND and OR UI we've tried without a doubt. –  user1757436 Sep 12 '13 at 12:22
    
@user1757436 - very interesting link, thanks. –  obelia Sep 12 '13 at 16:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.