logo

There's No Accounting For Bad Logic

Each time you guys perform a search on the demo I linked to yesterday it logs the search query and the number of hits.

ScreenShot001

It's funny seeing what you guys are searching for. Call it non-invasive user-testing. Although this isn't real user testing, as you guys are developers.  Which makes me think it must be badly designed if you, as developers, don't get it.

I'm seeing search strings like:

SELECT Title="Test*"

Or

@Contains(Title; "Test*");

Now, there's every chance that there could be a document with a title of "Test*", in which case you'd get a hit, but the likelihood is that you'll get nothing in return for those searches.

Wildcards are only supported by the "Is Like" option for string fields!

Other search strings with no hits include:

SELECT Title="wqqweqwewq" & Title="asasas"

Now, that's just plain bad logic.

For the most part that it looks like you get it, which makes me confident that Joe User might be able to.

It makes me wonder if bad logic can be caught. I'm guessing not as there are too many variants to cater for. It has to be down to the common sense of the user.

That said, one of the common mistakes I make is to write things like this:

@If(@LowerCase(field)="Foo"; this; that)

Then I spend ages wondering why it isn't working. Doh! You guys got any common logic errors you make?

Comments

    • avatar
    • Mike
    • Fri 6 Mar 2009 12:50 PM

    Forgetting the quotes around the field name when doing an @setfield is one of my big gotchas.

    • avatar
    • Jake Howlett
    • Fri 6 Mar 2009 02:42 PM

    Or to not put quotes when using @IsAvailable. Or do you? I can never remember...

    • avatar
    • Rob
    • Fri 6 Mar 2009 05:02 PM

    One of the biggest problems with search builders is when you have no idea what's in the database you are very likely to build search strings that return nothing. That's happened to me on many sites in the past.

    One suggestion that might help is have the search qualifier default to "Is Like" or "Contains". So I did the search "SELECT @Like(title; "%")" which I think returns every record in the database.

    I also noticed that the search is case sensitive. Most search systems I've run across are not.

    I wish my Notes Email client could sort the search results like this. Hay, how about a Flex email client for Notes. Wouldn't that be killer.

    Peace,

    Rob:-]

  1. Did it again this week.

    Put a WQS agent in WQO and spent the next hour staring at my correct (as it happens) code.

    • avatar
    • Raven
    • Mon 9 Mar 2009 06:37 AM

    wish that notes formula is close to SQL when building queries :]

    couldn't get the hang of it though.

    i think the wildcard should be used like this select field =* criteria. i think it's the same as @contains right?

    i'm just new to notes but getting the hang of it though :]

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Fri 6 Mar 2009

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content