From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Sat, 22 Dec 2007 16:45:54 -0800 Subject: [sup-talk] [PATCH] More gmail search goodness In-Reply-To: <1196202259-sup-7348@tomsk> References: <1196202259-sup-7348@tomsk> Message-ID: <1198367430-sup-936@south> Excerpts from Marcus Williams's message of Tue Nov 27 14:34:02 -0800 2007: > Simple patch attached. Adds the "during" operator to the date searches > so you can say during:today or during:november. Applied as is. Thanks! > The last two required changing the return value to a list/pair in > parse_user_string_query and I'm not sure what the best way to do this > in ruby is. For now its a simple list. That's the right way. > Also is there a better way to deal with a nil result other than > returning [nil,nil]? You can just return nil. > I figured you'd never want to search killed threads... and it made the > patch nastier because of the :skip_killed flag. Actually, by default, killed threads are always searched. It's only in inbox-mode that you don't want to see them. > I'd like to add a has:attachment operator but the ferret index doesnt > appear to store enough info for this. It would be really nice to be > able to search for attachments (of certain types as well with > filename:...) I took a look at extending the index to add a new field > "filename" that contains a list of filenames attached to a message, > but this would break everyones index so I'm just requesting it as a > wishlist item rather than submitting a patch. You're right, it requires adding an attachment field to the index. I think that adding a field to the Ferret index doesn't break index compatibility, so this actually might not be too hard to do. You'll have to rebuild the index to fill in the attachment status for pre-existing messages, but the change wouldn't invalidate anyone's index. -- William