Searching for multiple values in a parameter

2 views
Skip to first unread message

Fintan Donaghy

unread,
Oct 19, 2010, 10:18:57 AM10/19/10
to athena-t...@googlegroups.com
Hi all,
In Athena you can search for multiple values of a TicketProp and return all tickets that have one of the values. this is simple for numbers etc..
 
name=in(1,2,3)
name=in( 1 , 2 , 3 )
 
This will return all tickets with name set to 1, 2 or 3
 
But for Strings there is a little bit of ambiguity
 
1. name=in(Tom,Dick,Harry)
2. name=in( Tom , Dick , Harry)
3. name=in("Tom","Dick","Harry")
4. name=in( " Tom ", " Dick ", " Harry")
5. name=in("Tom,Dick","Harry")
 
note the use of quotes and spaces? Should all of these find Tom, Dick and Harry? I believe only number 3 should find the three names. Any opinions?
 
Should we introduce strict checking that ensures that values are valid for the TicketProp?
 
 
 

Joe Winter

unread,
Oct 19, 2010, 10:29:39 AM10/19/10
to athena-t...@googlegroups.com
I wouldn't necessarily recommend option 4 be considered valid (we're not searching for text within a document), but it should give some pause that I might do a search for someone listed in the database as Jon, not Jonathan.

I guess it also depends on your thoughts of how intelligent the search engine should act when searching for names. Should a search for Joe also return results containing people listed as Joseph?

--
Visit: http://athena.fracturedatlas.org/tix
 
You received this email because you are subscribed to the "ATHENA Tix Developers" group on Google Groups.
 
To post, email: athena-t...@googlegroups.com
To unsubscribe, email: athena-tix-dev...@googlegroups.com
For more, visit: http://groups.google.com/group/athena-tix-devel?hl=en

Micah L. Frost

unread,
Oct 19, 2010, 11:38:56 AM10/19/10
to athena-t...@googlegroups.com
Is there any harm in trimming the whitespace on the front and back of the search terms? 5 would still be considered a valid query, but wouldn't give the expected results. I think we should require that strings be quoted, but do our best to be smart about whitespace.

As for the Joe vs Joseph question: that seems like an entirely different ball-game. Maybe down the road, we can look at something like Soundex?

Micah

Gary Moore

unread,
Oct 19, 2010, 11:52:52 AM10/19/10
to athena-t...@googlegroups.com
If strings must be quoted, must all values? Should we be lenient on the quotes meaning that we accept queries with and without quotes? I feel like that's how GET query strings work now.

Trimming whitespace at front and back, don't care either way. Let's go with "Yes, trim it."

Fintan Donaghy

unread,
Oct 19, 2010, 1:49:01 PM10/19/10
to athena-t...@googlegroups.com
So to summarize querys 1 to 4 are valid and would find Tom, Dick and Harry
Query 5 would do a valid search but in the absence of a name called
'Tom,Dick' it would just return Harry.

I think a LIKE query would go a bit towards solving the issue of the Jon,
Jonathon issue but as Micah suggested finding Joseph from Joe might be
something for a future search.

--------------------------------------------------
From: "Gary Moore" <gary....@fracturedatlas.org>
Sent: Tuesday, October 19, 2010 4:52 PM
To: <athena-t...@googlegroups.com>

Reply all
Reply to author
Forward
0 new messages