Re: Building a Queryable


On Sat, 2006-09-02 at 10:51 -0500, Adam Gautier wrote:
> I need an IMAPQueriable as my mail is on various IMAP servers.  I have a
> bunch of python code for interacting with the IMAP server that I am hoping
> to be able to rewrite for C# or I assume that I can find libraries for C#.

IronPython now runs on Mono, so you might be able to reuse something
there.  I'm not sure how IronPython reconciles the python libraries vs.
the .net ones, though.

>  I started with wanting to write a simple QueryQueriable and I followed
> NetBeagleQueryable as a model since it inherits from IQueryable and others
> inherit from LuceneFileQueryable and IIndexableGenerator.   I now have a
> stub that implements the DoQuery, GetQueryableStatus, GetItemCount,
> GetSnippit, AcceptQuery, and Start methods.

If you are going to be creating a backend which is going to query the
remote store and do searches that way, then take a look at
GoogleDriver.cs.  It's probably the best example on how to write a

If your intent is to suck down the data from the remote side and index
it locally, you'll want to create a more traditional Queryable that
derives from LuceneQueryable.  Take a look at things like the
GaimLogQueryable for that.  The EvolutionDataServerQueryable is a good
example of how to index things not backed by a file, but it can be a
little tough to follow.

Another problem that has to be solved for you is how you will open
results on the client-side.  There isn't a general-purpose URI scheme
for opening emails.  Evolution has its own, as does Thunderbird, as does
KMail.  Depending on how you open your emails, you will probably need to
hack the mail tile in beagle-search to do the right thing when you click
on it.  It would have to be general enough for it to be accepted

It's been on my TODO list to write docs for all of this but I haven't
been able to get around to it yet.  I'll try to renew that soon.

> My second problem is that I have been away from a configure && make &&
> make install based projects for several yaers.  How do I get my new test
> code to compile in with the rest of beagle?  I know there are no stupid
> questions but that sure comes close :)

Generally, just open the file and drop them the

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]