After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 503366 - Cannot search number in text files
Cannot search number in text files
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Store
git master
Other opensolaris
: Normal normal
: ---
Assigned To: tracker-general
Jamie McCracken
Depends on:
Blocks:
 
 
Reported: 2007-12-13 05:51 UTC by seven
Modified: 2010-05-20 16:34 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description seven 2007-12-13 05:51:11 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:
Comment 1 seven 2008-01-07 09:46:37 UTC
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
Comment 2 Lei Ju 2008-02-20 05:11:16 UTC
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.
Comment 3 avazhang 2008-07-29 10:45:01 UTC
Reproducible on Solaris Verm95(Gnome 2.23.4 + Tracker 0.6.6)
Comment 4 Martyn Russell 2010-03-11 15:22:04 UTC
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 :)
Comment 5 Martyn Russell 2010-03-16 14:35:40 UTC
(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?
Comment 6 Tshepang Lekhonkhobe 2010-03-16 15:30:59 UTC
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.
Comment 7 Tobias Mueller 2010-05-02 00:37:16 UTC
Reopening as I can't see any open non developer question.
Comment 8 Aleksander Morgado 2010-05-02 11:04:06 UTC
> > 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.
Comment 9 Aleksander Morgado 2010-05-18 18:39:25 UTC
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.
Comment 10 Martyn Russell 2010-05-20 16:34:27 UTC
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.