Gaim logs are being indexed ok, but HitIsValid is deeming all IRC logs invalid. This is because the log file path contains a '#' (the IRC channel prefix), and we have some more URI braindamage on our hands here: The Uri gaimlog://foo/something/#chan/bar/blah has Segments something along the lines of "/", "foo/", and "something/". We can work around this with escaping etc. but it gets ugly. It's simpler to just treat GAIM logs as files. Index: Tiles/HitFlavor.cs =================================================================== RCS file: /cvs/gnome/beagle/Tiles/HitFlavor.cs,v retrieving revision 1.5 diff -u -B -p -r1.5 HitFlavor.cs --- Tiles/HitFlavor.cs 9 Oct 2004 12:55:10 -0000 1.5 +++ Tiles/HitFlavor.cs 2 May 2005 22:37:10 -0000 @@ -88,14 +88,14 @@ namespace Beagle.Tile { public int Weight { get { int weight = 0; - if (Uri != null) - ++weight; if (Type != null) - ++weight; + weight += 8; if (MimeType != null) - ++weight; + weight += 4; + if (Uri != null) + weight += 2; if (Source != null) - ++weight; + weight += 1; return weight; } } Index: Util/ImLog.cs =================================================================== RCS file: /cvs/gnome/beagle/Util/ImLog.cs,v retrieving revision 1.15 diff -u -B -p -r1.15 ImLog.cs --- Util/ImLog.cs 31 Mar 2005 16:50:21 -0000 1.15 +++ Util/ImLog.cs 2 May 2005 22:37:11 -0000 @@ -76,14 +76,7 @@ namespace Beagle.Util { { } public Uri Uri { - get { - // Hacky - string when = StartTime.ToString ("yyyy-MM-dd.HHmmss"); - string uriStr = String.Format ("imlog://{0}/{1}/{2}/{3}/{4}", - Client, Protocol, Identity, SpeakingTo, - when); - return new Uri (uriStr, true); - } + get { return UriFu.UriStringToUri (this.LogFile); } } public string EllipsizedSnippet { Index: beagled/GaimLogQueryable/GaimLogQueryable.cs =================================================================== RCS file: /cvs/gnome/beagle/beagled/GaimLogQueryable/GaimLogQueryable.cs,v retrieving revision 1.28 diff -u -B -p -r1.28 GaimLogQueryable.cs --- beagled/GaimLogQueryable/GaimLogQueryable.cs 14 Mar 2005 13:27:49 -0000 1.28 +++ beagled/GaimLogQueryable/GaimLogQueryable.cs 2 May 2005 22:37:11 -0000 @@ -284,27 +284,9 @@ namespace Beagle.Daemon.GaimLogQueryable override protected bool HitIsValid (Uri uri) { - // FIXME: A hack while we settle on a better URI scheme for imlog - // An imlog uri looks like imlog://gaim/aim/joefoo/janebar/2005-03-05.120145 - - string log_path = log_dir; - - if (uri.Authority != "gaim") - return false; - - foreach (string path in uri.Segments) { - if (path == "/") - continue; - - log_path = Path.Combine (log_path, path); - } - - if (File.Exists (log_path + ".txt")) + if (File.Exists (uri.LocalPath)) return true; - if (File.Exists (log_path + ".html")) - return true; - return false; } }