GNOME Bugzilla – Bug 503366
Cannot search number in text files
Last modified: 2010-05-20 16:34:27 UTC
Please describe the problem: We cannot search the keywords which include numbers in it. Steps to reproduce: 1. Create an empty file named 'tracker'. 2. Type 'Database tables' in the file and save it. 3. Type 'Database tables' in Search textfiled, press Enter key. 4. Modify the content of 'tracker' file to 'Database 888 tables'. 5. Type 'Database 888 tables' or '888 tables' in Search textfiled, press Enter key. Actual results: After step 3, you can get the file named 'tracker', but after step 5, you cannot get the file named 'tracker'. Expected results: After step 3, you can get the file named 'tracker', After step 5, you can get the file named 'tracker' Does this happen every time? YES Other information:
And we cannot search number as keyword in email subject either. Steps to reproduce: 1. Receive an email file subject with '398597'. 2. Type '398597' in Search text filed, press Enter key. Actual results: We cannot get the email subject with '398597'. Expected results: We can get the email subject with '398597'. Does this happen every time? YES
1. tracker->index_numbers is always false. A entry should be added in preference for this. 2. the following patch must be applied. --- tracker-parser.c (revision 1135) +++ tracker-parser.c (working copy) @@ -204,10 +204,10 @@ if (filter_numbers) { if (type == WORD_NUM) { - //if (!tracker->index_numbers) { + if (!tracker->index_numbers) { is_valid = FALSE; continue; - //} + } } else { It seems that Jamie commented the 2 lines for some reasons. After fixing these, numbers could be indexed and searched.
Reproducible on Solaris Verm95(Gnome 2.23.4 + Tracker 0.6.6)
Can the reporter of this bug set the _version_ so we can target bugs to work on more easily please. We can also have an idea about if these bugs are likely to be obsolete too. If you don't set the version, we are less likely to look at them. Sorry for the spam, but I don't want to say this 88 times on each bug :)
(In reply to comment #2) > 1. tracker->index_numbers is always false. A entry should be added in > preference for this. Yes, it is currently unsupported. We are not sure if it really makes sense at this point. Jürg, is this something we want to support at some stage?
It would mean a lot to me if you guys can implement this since I deal with a lot of phone numbers. At least have it optional and non-default.
Reopening as I can't see any open non developer question.
> > 1. tracker->index_numbers is always false. A entry should be added in > > preference for this. > > Yes, it is currently unsupported. We are not sure if it really makes sense at > this point. > Probably, doesn't make any sense to have this option. Numbers should be indexed as any other word, IMHO, specially for cases as Tshepang says, to index phone numbers for example.
I added a new "IgnoreNumbers" option in tracker-fts.cfg, by default TRUE (meaning that words starting with numbers are not considered, as currently being done). If set to FALSE, numbers are indexed as any other word. This patch is in the parser-unicode-libs-review branch.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.