Feng Forum

Support => Older versions => : Number8 August 05, 2009, 05:04:27 PM

: Search won't find numbers...
: Number8 August 05, 2009, 05:04:27 PM
In the Search box, type 12.  Press Search.
No results returned, even though I have several Notes that have '12' both standing alone, and as part of an IP address.
Seems like a pretty dumb limitation...

OG 1.5.1
: Re: Search won't find numbers...
: Pet August 05, 2009, 05:17:26 PM
That may not work so well, but forum search does! Look what I found here (http://forums.opengoo.org/index.php?topic=2157.0), over there (http://forums.opengoo.org/index.php?topic=1711.0), and here (http://forums.opengoo.org/index.php?topic=1635.0) too.

cheers
: Re: Search won't find numbers...
: Number8 August 05, 2009, 08:52:12 PM
 You have much better forum search skills than I do (likely), or a lot more time on  your hands to sift through all the results.
When I search on the forum for "Search" I get 6 pages of results.
When I search for "Search Numbers" I get two results, completely unrelated.

And If I find the links you found, what?  I know that OG's search capability is numbingly limited; knowing why makes little difference to my trying to find an IP address in a note, document, calendar event, etc.

It's a shocking design decision that Search won't return a note containing "192", or even the longer string "192.168.0.1".
: Re: Search won't find numbers...
: ignacio August 06, 2009, 11:38:29 AM
For a quick fix you can try this, but it will be much slower when the system is loaded. Edit file 'application/models/searchable_objects/SearchableObjects.class.php' and change around line 113 from:

:
    if($include_private) {
    if (substr(Localization::instance()->getLocale(),0,2) == 'zh')
    return DB::prepareString('`content` LIKE \'%' . $search_for . '%\'' . $wsSearch . $trashed . $otSearch . $columnsSearch );
    else
    return DB::prepareString('MATCH (`content`) AGAINST (\'' . $search_for . '\' IN BOOLEAN MODE)'  . $wsSearch . $trashed . $otSearch . $columnsSearch );
    } else {
    if (substr(Localization::instance()->getLocale(),0,2) == 'zh')
    return DB::prepareString('`content` LIKE \'%' . $search_for . '%\' AND `is_private` = 0' . $wsSearch . $trashed . $otSearch . $columnsSearch );
    else
    return DB::prepareString('MATCH (`content`) AGAINST (\'' . $search_for . '\' IN BOOLEAN MODE) AND `is_private` = 0' .$wsSearch . $trashed . $otSearch . $columnsSearch);
    } // if

to:

:
    if($include_private) {
    if (true || substr(Localization::instance()->getLocale(),0,2) == 'zh')
    return DB::prepareString('`content` LIKE \'%' . $search_for . '%\'' . $wsSearch . $trashed . $otSearch . $columnsSearch );
    else
    return DB::prepareString('MATCH (`content`) AGAINST (\'' . $search_for . '\' IN BOOLEAN MODE)'  . $wsSearch . $trashed . $otSearch . $columnsSearch );
    } else {
    if (true || substr(Localization::instance()->getLocale(),0,2) == 'zh')
    return DB::prepareString('`content` LIKE \'%' . $search_for . '%\' AND `is_private` = 0' . $wsSearch . $trashed . $otSearch . $columnsSearch );
    else
    return DB::prepareString('MATCH (`content`) AGAINST (\'' . $search_for . '\' IN BOOLEAN MODE) AND `is_private` = 0' .$wsSearch . $trashed . $otSearch . $columnsSearch);
    } // if

Please tell us how it worked for you, and if you can please try this with a big load on the system (tens of thousands of objects) and compare it to the previous search.

Thanks.
: Re: Search won't find numbers...
: ignacio August 06, 2009, 11:40:57 AM
And of course it's not a design decision not to be able to find some stuff. We know we have to improve the search, but we also have to improve tons of other features. Sooner or later we will work on it. If you really need it you could sponsor the development of the search functionality.
: Re: Search won't find numbers...
: Pet August 06, 2009, 04:16:42 PM
You have much better forum search skills than I do (likely), or a lot more time on  your hands to sift through all the results.
When I search on the forum for "Search" I get 6 pages of results.

All of 30 seconds, probably because I'm familiar with those issues.

I know that OG's search capability is numbingly limited; knowing why makes little difference to my trying to find an IP address in a note, document, calendar event, etc.

It's a shocking design decision that Search won't return a note containing "192", or even the longer string "192.168.0.1".

Number8, normally your many posts are genuinely helpful, so I can understand frustration comes out at times.

Since you say you already knew about the search limitations, then I think a feature request post would be more helpful in this case. I'd be happy to add my support of such a request.