Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

ticket search engine = results are a disaster


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 ('
            .$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

Thank you


  • There are several issue reports for search over at github you might want to read through them.
    I also beleive that the problem is fixed in the next version once it is released.
  • JohnK, did you find a solution? That freakin problem is still there in 1.10...

  • Hello Jassonmc

    I downgraded again :x
Sign In or Register to comment.