Commit 288df3d0 authored by Vincent Untz's avatar Vincent Untz Committed by Martyn Russell

gtksearchenginetracker: Use non-case sensitive search for non-fts search

https://bugzilla.gnome.org/show_bug.cgi?id=642773
parent c5868f05
......@@ -300,6 +300,18 @@ sparql_append_string_literal (GString *sparql,
g_free (s);
}
static void
sparql_append_string_literal_lower_case (GString *sparql,
const gchar *str)
{
gchar *s;
s = g_utf8_strdown (str, -1);
sparql_append_string_literal (sparql, s);
g_free (s);
}
static void
gtk_search_engine_tracker_start (GtkSearchEngine *engine)
{
......@@ -350,8 +362,8 @@ gtk_search_engine_tracker_start (GtkSearchEngine *engine)
"WHERE {"
" ?urn a nfo:FileDataObject ;"
" tracker:available true ."
" FILTER (fn:contains(nfo:fileName(?urn),");
sparql_append_string_literal (sparql, search_text);
" FILTER (fn:contains(fn:lower-case(nfo:fileName(?urn)),");
sparql_append_string_literal_lower_case (sparql, search_text);
g_string_append (sparql,
"))"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment