beagle r4609 - in trunk/beagle: beagled conf-data



Author: dbera
Date: Thu Mar 13 19:26:47 2008
New Revision: 4609
URL: http://svn.gnome.org/viewvc/beagle?rev=4609&view=rev

Log:
* Typo in query mapping.
* If no filter is able to index the indexable, set no content true
correctly so that Lucene does not ask for content from this indexable.


Modified:
   trunk/beagle/beagled/FilterFactory.cs
   trunk/beagle/beagled/LuceneIndexingDriver.cs
   trunk/beagle/conf-data/query-mapping.xml

Modified: trunk/beagle/beagled/FilterFactory.cs
==============================================================================
--- trunk/beagle/beagled/FilterFactory.cs	(original)
+++ trunk/beagle/beagled/FilterFactory.cs	Thu Mar 13 19:26:47 2008
@@ -346,6 +346,7 @@
 
 			if (Debug)
 				Logger.Log.Debug ("None of the matching filters could process the file: {0}", path);
+			indexable.NoContent = true;
 			
 			return false;
 		}

Modified: trunk/beagle/beagled/LuceneIndexingDriver.cs
==============================================================================
--- trunk/beagle/beagled/LuceneIndexingDriver.cs	(original)
+++ trunk/beagle/beagled/LuceneIndexingDriver.cs	Thu Mar 13 19:26:47 2008
@@ -544,7 +544,8 @@
 			// If we have content, try to find a filter
 			// we we can use to process the indexable
 			try {
-				FilterFactory.FilterIndexable (indexable, (disable_textcache ? null : text_cache), out filter);
+				if (! FilterFactory.FilterIndexable (indexable, (disable_textcache ? null : text_cache), out filter))
+					indexable.NoContent = true;
 			} catch (Exception e) {
 				indexable.NoContent = true;
 			}

Modified: trunk/beagle/conf-data/query-mapping.xml
==============================================================================
--- trunk/beagle/conf-data/query-mapping.xml	(original)
+++ trunk/beagle/conf-data/query-mapping.xml	Thu Mar 13 19:26:47 2008
@@ -38,7 +38,7 @@
     <Mapping QueryKeyword="pkggroup" BeagleProperty="pkg:group" Tokenize="true">Group to which the package belongs e.g. System/Configuration/Packaging</Mapping>
     <Mapping QueryKeyword="inarchive" BeagleProperty="fixme:inside_archive" Tokenize="false">Use 'inarchive:true' for files inside an archive.</Mapping>
     <Mapping QueryKeyword="album" BeagleProperty="fixme:album" Tokenize="true">Album name of the music</Mapping>
-    <Mapping QueryKeyword="filename" BeagleProperty="beagle:NoPunctFilename" Tokenize="true">File name<Mapping>
-    <Mapping QueryKeyword="filename" BeagleProperty="beagle:SplitFilename" Tokenize="true">File name<Mapping>
+    <Mapping QueryKeyword="filename" BeagleProperty="beagle:NoPunctFilename" Tokenize="true">File name</Mapping>
+    <Mapping QueryKeyword="filename" BeagleProperty="beagle:SplitFilename" Tokenize="true">File name</Mapping>
   </Mappings>
 </QueryMapping>



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