Quantcast
Channel: Recent Discussions on osTicket Forums
Viewing all articles
Browse latest Browse all 7550

ticket search engine = results are a disaster

$
0
0
Hello,

I recently upgraded from 1.9.6 to 1.9.12 and it seems the search function is changed drastically.

Short description of the situation: 

- there is a giant list of tickets with as subject: request parking badge employee xxxxx (=5digits)
- we were able to search the relevant ticket using following string: employee 12345
- we got a search result with 1 entry: the ticket we need: request parking badge employee 12345

After the upgrade we get back 500 results where it is not even guaranteed the employee number is in the list.
I examined the code a bit and see there is a boolean search query sorted by relevance... but is it really not working as it should

The new query code in 1.9.12

    function find($query, $criteria=array(), $model=false, $sort=array()) {
        global $thisstaff;
        $mode = ' IN BOOLEAN MODE';
        #if (count(explode(' ', $query)) == 1)
        #    $mode = ' WITH QUERY EXPANSION';
        $query = $this->quote($query);
        $search = 'MATCH (search.title, search.content) AGAINST ('
            .db_input($query)
            .$mode.') ';
        $tables = array();
        $P = TABLE_PREFIX;
        $sort = '';

        if ($query) {
            $tables[] = "(
                SELECT object_type, object_id, $search AS `relevance`
                FROM `{$P}_search` `search`
                WHERE $search
            ) `search`";
            $sort = 'ORDER BY `search`.`relevance`';
        }



Can I replace this with the old search code and can somebody provide it please?
Version 1.9.6 did not have a class.search.php

Thank you



Viewing all articles
Browse latest Browse all 7550

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>