beagle r4412 - in trunk/beagle: Util beagled/KMailQueryable beagled/KonqHistoryQueryable
- From: dbera svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4412 - in trunk/beagle: Util beagled/KMailQueryable beagled/KonqHistoryQueryable
- Date: Thu, 24 Jan 2008 23:25:49 +0000 (GMT)
Author: dbera
Date: Thu Jan 24 23:25:49 2008
New Revision: 4412
URL: http://svn.gnome.org/viewvc/beagle?rev=4412&view=rev
Log:
Fix the URIs of konqueror hits. Dont decode them before storing since that will change "&" to " " and change some other characters making it unusable. Also, set the crawlmode to true for files during crawling.
Remove some debug messages too.
Modified:
trunk/beagle/Util/KonqHistoryUtil.cs
trunk/beagle/beagled/KMailQueryable/KMailIndexableGenerator.cs
trunk/beagle/beagled/KonqHistoryQueryable/KonqQueryable.cs
Modified: trunk/beagle/Util/KonqHistoryUtil.cs
==============================================================================
--- trunk/beagle/Util/KonqHistoryUtil.cs (original)
+++ trunk/beagle/Util/KonqHistoryUtil.cs Thu Jan 24 23:25:49 2008
@@ -43,8 +43,7 @@
reader.ReadLine ();
// line-2: URL
- string _url = reader.ReadLine ();
- url = System.Web.HttpUtility.UrlDecode (_url);
+ url = reader.ReadLine ();
// line-3: creation date
creation_date = reader.ReadLine ();
Modified: trunk/beagle/beagled/KMailQueryable/KMailIndexableGenerator.cs
==============================================================================
--- trunk/beagle/beagled/KMailQueryable/KMailIndexableGenerator.cs (original)
+++ trunk/beagle/beagled/KMailQueryable/KMailIndexableGenerator.cs Thu Jan 24 23:25:49 2008
@@ -85,7 +85,7 @@
if (num_file_in_dir == 0)
return;
indexer.Progress = (num_dir_crawled + ((double) num_file_in_dir_crawled / num_file_in_dir)) / num_dirs;
- Log.Debug ("Progress {4} = ({0} + {1}/{2})/{3}", num_dir_crawled, num_file_in_dir_crawled, num_file_in_dir, num_dirs, current_dir.FullName);
+ //Log.Debug ("Progress {4} = ({0} + {1}/{2})/{3}", num_dir_crawled, num_file_in_dir_crawled, num_file_in_dir, num_dirs, current_dir.FullName);
}
private void AddDirectory (string _dir) {
Modified: trunk/beagle/beagled/KonqHistoryQueryable/KonqQueryable.cs
==============================================================================
--- trunk/beagle/beagled/KonqHistoryQueryable/KonqQueryable.cs (original)
+++ trunk/beagle/beagled/KonqHistoryQueryable/KonqQueryable.cs Thu Jan 24 23:25:49 2008
@@ -148,7 +148,7 @@
{
if (path.EndsWith (".new"))
return;
- Indexable indexable = FileToIndexable (path);
+ Indexable indexable = FileToIndexable (path, false);
if (indexable == null)
return;
Scheduler.Task task = NewAddTask (indexable);
@@ -160,7 +160,7 @@
/////////////////////////////////////////////////
- private Indexable FileToIndexable (string path) {
+ private Indexable FileToIndexable (string path, bool crawl_mode) {
//Logger.Log.Debug ("KonqQ: Trying to index " + path);
FileStream stream;
@@ -190,7 +190,7 @@
return null; // we wont index bad files and non-html files
}
- Logger.Log.Debug ("KonqQ: Indexing " + path + " with url=" + url);
+ //Logger.Log.Debug ("KonqQ: Indexing " + path + " with url=" + url);
Uri uri = new Uri (url, true);
if (uri.Scheme == Uri.UriSchemeHttps) {
Logger.Log.Error ("Indexing secure https:// URIs is not secure!");
@@ -204,6 +204,7 @@
indexable.AddProperty (Property.NewUnstored ("fixme:urltoken", StringFu.UrlFuzzyDivide (url)));
// hint for the filter about the charset
indexable.AddProperty (Property.NewUnsearched (StringFu.UnindexedNamespace + "charset", charset));
+ indexable.Crawled = crawl_mode;
DateTime date = DateTimeUtil.UnixToDateTimeUtc (0);
date = date.AddSeconds (Int64.Parse (creation_date));
@@ -224,7 +225,7 @@
{
if (current_file == null)
return null;
- return FileToIndexable (current_file.FullName);
+ return FileToIndexable (current_file.FullName, true);
}
public bool HasNextIndexable ()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]