[tracker/fts-limits] Addition to "Limit the word length in exact match queries but not in prefix ones."
- From: Mikael Ottela <mottela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/fts-limits] Addition to "Limit the word length in exact match queries but not in prefix ones."
- Date: Thu, 25 Feb 2010 09:00:30 +0000 (UTC)
commit 22253e4c3810220fd5300f9f843ac3e8ebd9772b
Author: Mikael Ottela <mikael ottela ixonos com>
Date: Wed Feb 24 02:05:53 2010 +0200
Addition to "Limit the word length in exact match queries but not in prefix ones."
src/libtracker-fts/tracker-fts.c | 5 +++++
tests/libtracker-fts/limits/fts3limits-4.out | 1 -
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-fts/tracker-fts.c b/src/libtracker-fts/tracker-fts.c
index 76083be..fa5fdbd 100644
--- a/src/libtracker-fts/tracker-fts.c
+++ b/src/libtracker-fts/tracker-fts.c
@@ -4341,6 +4341,11 @@ static int tokenizeSegment(
break;
}
+ /* If prefix search ignore the word lenght limit */
+ if( nToken < v->min_word_length && !(iEnd<nSegment && pSegment[iEnd]=='*') ){
+ continue;
+ }
+
// printf("token being indexed is %s, pos is %d, begin is %d, end is %d and length is %d\n", pToken, iPos, iBegin, iEnd, nToken);
if( !inPhrase &&
diff --git a/tests/libtracker-fts/limits/fts3limits-4.out b/tests/libtracker-fts/limits/fts3limits-4.out
index cde9bca..e69de29 100644
--- a/tests/libtracker-fts/limits/fts3limits-4.out
+++ b/tests/libtracker-fts/limits/fts3limits-4.out
@@ -1 +0,0 @@
-"http://www.example.org/test#2"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]