Re: REALLY adding search to balsa
- From: John Rowe <rowe excc ex ac uk>
- To: balsa-list gnome org
- Subject: Re: REALLY adding search to balsa
- Date: Mon, 17 Dec 2001 14:30:20 +0000
> Could you tell me what you are planning for your lib ?
> In fact I think my code is not as generic as it should (for example I
> think your library uses sieve format?).
Thanks for the reply Emmanuel.
I agree that flexibility is the key. It also needs to be simple to use
for the 99% of people who will never enter a Boolean in their life,
let alone a regexp, but still want some of the capabilities they
provide. (It's tricky to handle both!)
A Free Software project like Balsa should have best-of-class search.
Right now my library supports text searches with booleans, negation,
parentheses, lists (any two of..), phrases, regular expressions,
case (in)sensitivity, smart spaces and beginning/end of or exact word.
Arbitrary subsearches over any combination of Fields (Sender, Body, etc.)
can be combined so you can search for:
Subject contains chocolate || (Any two of : (Body contains any two of
(foo bar baz) but does not contain fredo) (Sender was not Tim || the
Subject does not contain "hello mum")
(Subject contains astrophysics)
)
For each target (ie mail message) it tries the cheaper fields first
and it only asks for each field once. There's also support for
numerical ranges so we could have a "less than n bytes" option,
The above all works but could do with some more testing. It's very
extensible and I'm certainly open to ideas to make it more flexible.
I need to put in a date search and catagory matching and at the moment
I'm writing the GTK front-end. The default panel will omit the
regexp-type options and possibly the boolean and/or start/end/exact
word options but that will be configurable.
It all works by "quantified lists" (is here a proper term for
this?) where every expression is a list of sub-expressions and a
threshold of how many have to be true for the expression to be
true. This lets me have a simple choice for the non-advanced panel
that looks a bit like:
* Require all the above words
o Require at least __1__ word
Most people can understand that and also what it means if you replace
'1' by '2'. If you enter a boolean text search it parses it to a list.
The same syntax is used when combining searches over different fields.
I don't see IMAP searching as posing any huge problems.
I see that the latest beta has some searching capabilities but given
the comment of somebody alse on this list I haven't dared try it! The
interface between my library and the application is extremely simple
so it would be trivial to give it a go.
If there's a realistic chance of getting it into balsa I could get the
front-end
ready quite quickly.
Hope this helps.
Regards
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]