tracker r2142 - in branches/indexer-split: . src/trackerd



Author: mottela
Date: Fri Aug 22 11:40:53 2008
New Revision: 2142
URL: http://svn.gnome.org/viewvc/tracker?rev=2142&view=rev

Log:
Fixes to index and string metadata type handling in queries

Modified:
   branches/indexer-split/ChangeLog
   branches/indexer-split/src/trackerd/tracker-db.c
   branches/indexer-split/src/trackerd/tracker-rdf-query.c

Modified: branches/indexer-split/src/trackerd/tracker-db.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-db.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-db.c	Fri Aug 22 11:40:53 2008
@@ -3002,7 +3002,9 @@
 			g_free (display_field);
 		}
 			
-		if (tracker_field_get_data_type (def) == TRACKER_FIELD_TYPE_DOUBLE) {
+		if ((tracker_field_get_data_type (def) == TRACKER_FIELD_TYPE_DOUBLE) ||
+		    (tracker_field_get_data_type (def) == TRACKER_FIELD_TYPE_INDEX)  ||
+		    (tracker_field_get_data_type (def) == TRACKER_FIELD_TYPE_STRING)) {
 			where_field = g_strdup_printf ("M%d.MetaDataDisplay", field_count);
 		} else {
 			where_field = g_strdup_printf ("M%d.MetaDataValue", field_count);

Modified: branches/indexer-split/src/trackerd/tracker-rdf-query.c
==============================================================================
--- branches/indexer-split/src/trackerd/tracker-rdf-query.c	(original)
+++ branches/indexer-split/src/trackerd/tracker-rdf-query.c	Fri Aug 22 11:40:53 2008
@@ -803,17 +803,9 @@
 
                         data_type = tracker_field_data_get_data_type (field_data);
 
-                        if (data_type == TRACKER_FIELD_TYPE_DATE ||
-                            data_type == TRACKER_FIELD_TYPE_INTEGER ||
-                            data_type == TRACKER_FIELD_TYPE_DOUBLE) {
-                                g_string_append_printf (str, " (%s = %s) ", 
-                                                        where_field, 
-                                                        value);
-                        } else {
-                                g_string_append_printf (str, " (%s = '%s') ", 
-                                                        where_field, 
-                                                        value);
-                        }
+			g_string_append_printf (str, " (%s = %s) ",
+						where_field,
+						value);
                 }
                 break;
                 



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