Re: Searching for %SYS
Thomas Arendsen Hein <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.roundup.user |
|---|---|
| Message-ID | <[email protected]> |
* John P. Rouillard <[email protected]> [20190827 03:52]: > In message > <DM6PR08MB477859405D66CDA22C6174A9CAA10@DM6PR08MB4778.namprd08.prod. > outlook.com>, Tom Ekberg writes: > >One of my users needs to be able to search an issue for something > >like %SYS. I know it can be done at the database level, but it seems > >roundup doesn't like the '%'. I tried these with no luck: %SYS, > >\%SYS, %%SYS, ^%SYS and %\%SYS%. It seems that the '%' is ignored. > > > >What is the preferred way to search for issues or messages containing > >something like %SYS? > > What are you using as the full text search engine? I assume native > database? > > At first guess, I suspect the full text search index strips > punctuation. I see reference to the pattern \b\w{%d,%d}\b in add_text > in a few places. IIRC \w matches alphanumerics and _. So I read the > regexp as matching just after the % in %SYS. So %SYS isn't in the > index but SYS is. > > I think we could change that regexp to: \b[\w%s]{%d,%d}\b and make %s > substitute a list of characters specified in config.ini. Maybe call > the setting indexer_wordchars? This may confuse the indexer, not sure. What about adding the possibility to do a (slow!) full text search? > In an emergency "grep -lr '%SYS' db/" then looking at the > messages/files to see what issues it's associated with could work. But > this search does ignore the title string... Title search on the search page already bypasses the indexer, so searching for %SYS in the title of an issue already works. Regards, Thomas -- Thomas Arendsen Hein <[email protected]> OpenPGP key: https://intevation.de/~thomas/thomas_pgp.asc (0xD45DE28FF3A2250C) Intevation GmbH, Neuer Graben 17, 49074 Osnabrueck - AG Osnabrueck, HR B 18998 Geschaeftsfuehrer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner