[KPhotoAlbum] Idea for quick search feature

Jan Kundrát jkt at gentoo.org
Thu Apr 26 00:41:08 CEST 2007


Shawn Willden wrote:
> This looks eerily like what I was considering, with the following differences:
> 
> 1.  As I mentioned when I started this thread, values without any sort of 
> field specifier are allowed and search all metadata (with the possible 
> exception of EXIF data).

Yup, I forgot to mention that I don't see much point in allowing those
queries (that can potentially consume plenty of time) in a web interface
that is exposed to malicious users.

In addition, I want to use nice URLs like
http://example.org/photos/birthday-party-at-freds for referring to
'event:birthday-party-at-freds' (where "event" is user-defined category
name).

In a search bar, such possibility would make a perfect sense, though.

> 3.  I would eliminate case sensitivity.  I think the value of case-sensitive 
> matching is small in this case, and the value in avoiding confusion for 
> non-geeks who don't think that 'A' is any different from 'a' is significant.  
> Actually, I think it would be good to make matching a little fuzzy to allow 
> for misspellings, but that's clearly beyond the present scope.

KPhotoAlbum allows you to create categories that differ only in case.
When this changes, I'll make my code match new behavior, but for now I
use it as an excuse for making code simpler :).

> I agree that if we decide to go this route for the search bar (which is far 
> from certain, even in my mind), it would be good to harmonize the syntax.  
> However, I also feel pretty strongly that my decisions above are more 
> friendly to non-geeks.

OTOH, if you want to preserve the current way of going "one level up"
while retaining all that flexibility, you'd have to introduce something
like a level separator -- if you're at "People:Shawn & width > 100 /
People:jkt | People:Fred", going up would mean "People:Shawn & width > 100".

> One other thing:  I think it really would be good to come up with a syntax for 
> expressing "People:{this exact set}".  Maybe that's not a bad syntax, 
> actually....
> 
> 	People:{"Paul Verlaine", Bob}
> 
> One think I'm not so sure about is the use of ':' and '='.  Maybe it's better 
> to always use '='?

That's why I use both operators. "=" means "is equal to" while ":" means
"contains". 'cat:item & cat:foo' would match anything that has at least
that value while 'cat=item,foo' would match stuff with nothing else.

Cheers,
-jkt

-- 
cd /local/pub && more beer > /dev/mouth

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : /mailman/pipermail/kphotoalbum/attachments/20070426/2095f67f/attachment.pgp 


More information about the KPhotoAlbum mailing list