beagle r4782 - trunk/beagle/Filters



Author: dbera
Date: Sat Jun 14 07:57:05 2008
New Revision: 4782
URL: http://svn.gnome.org/viewvc/beagle?rev=4782&view=rev

Log:
* FilterDocbook.cs: Extract "keyword"s as properties. Don't add the child-indexable content to the content of the parent. This _might_ break yelp since now matches in child-indexables (docbook entries) will be returned only as child indexables. yelp needs to use the ParentUri if hits have it, otherwise it should use Uri.


Modified:
   trunk/beagle/Filters/FilterDocbook.cs

Modified: trunk/beagle/Filters/FilterDocbook.cs
==============================================================================
--- trunk/beagle/Filters/FilterDocbook.cs	(original)
+++ trunk/beagle/Filters/FilterDocbook.cs	Sat Jun 14 07:57:05 2008
@@ -137,6 +137,9 @@
 							if (entry.Title == null)
 								entry.Title = reader.Value;
 						}
+					} else if (reader.Name == "keyword") {
+						reader.Read (); // read the text node
+						AddProperty (Property.NewKeyword ("dc:subject", reader.Value));
 					}
 					break;
 					
@@ -146,7 +149,8 @@
 						((DocbookEntry) entries_stack.Peek ()).Content.Append (reader.Value);
 
 					// Append text to the main indexable
-					AppendText (reader.Value);
+					else
+						AppendWord (reader.Value);
 					break;
 					
 				case XmlNodeType.EndElement:
@@ -163,6 +167,7 @@
 						indexable = new Indexable (UriFu.AddFragment (Indexable.Uri, entry.Id, false));
 						indexable.HitType = "DocbookEntry";
 						indexable.MimeType = "text/x-docbook-entry";
+						indexable.AddProperty (Property.NewKeyword ("beagle:FileType", "documentation"));
 						indexable.Filtering = IndexableFiltering.AlreadyFiltered;
 
 						indexable.AddProperty (Property.NewUnsearched ("fixme:id", entry.Id));



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