Hi, guys

So, today I have update from 1.10.1 to 1.15.7. All fine, no erros, all tickets are on the system, but when i try to search for a specific client which has the text on "Subject" field, theres less results than the 1.10 search.

Screenshots to help understand:
1.10 Search

1.15 Search

1.15 Info

1.10 Ticket count

1.15 Count

Sure, im searching for "LIFEMED" string.

Full tickets without the search

Searching for "LIFEMED" string appears only one on 28/03

    HarDBR

    Maybe it’s due to the accented characters? Try changing all the accented characters in the titles (eg. ç, á, etc.) to normal characters and retest.

    Cheers.

    Hi, so, just tried and same results. I can only find it if i search all ticktes or by the number. They have the same standard (Status = closed, Priority = Normal, Department and Source), the difference is the person who opened the ticket. Any ideias?

      HarDBR

      Oh, are the Departments different? If so you may not have Department access in which you will not see them in searches by default. If this is the case you will need to enable the permission called Search - See all tickets in search, regardless of access by going to Admin Panel > Agents > Agents, click your name, click Permissions tab, and click Miscellaneous.

      Cheers.

      Hi, so, the departaments are the same. My user has Admin role and the "See all..." is already checked. Any more ideias? I have tested another string and it has different results, If I search with CAPS, there are some results, but if I use lower caps, there are different results. I was thinking, could this be a index problem? Theres a way to rebuild all indexes for the tickets?

        HarDBR

        Backup the ost__search table, delete it, go to the ost_config table, set reindex to 1, ssh to the server, cd to the osticket directory, and run the following command:

        php manage.php cron search

        You will keep running this command until the system sets reindex back to 0.

        Cheers.

        8 days later

        It's me again, so, that kinda worked. Its shows now 11, before was 3, but still missing some, should i keep doing this until fixed? I did like 15 times, looks like infinite, sometimes it has gone from 3 to 13 to 8 and 11 now, seems random. Should i just keep doing the cron till 0?

          HarDBR

          Quote from my previous message:

          You will keep running this command until the system sets reindex back to 0.

          Cheers.

          So, Kevin

          reindex is 0 now, but no success, can i have the query used to search the tickets so i can test directly on db?
          There was any change on the search query? Probably yes XD
          As you can see, tickets goes from 03/24 to 04/24, but theres still tickets on the middle range.

            HarDBR

            I don't believe search has changed at all. Of course you were using a very old version so maybe.

            Yes you can var_dump(print $query); the query in the ORM and that will give you the full SQL query you can run in MySQL.

            Cheers.

            If I understand, i should use this call on any place or after the first $query atribuition on class.orm.php, right?

            @HarDBR

            There are 2 execute() methods in the orm. Place it in both before the return statements.

            Cheers.

            Hi, it's me again, ok sow, i have modified the blocks, but i dont think it was right. Check print:

            File "class.orm.php"
            Row 3315

                function execute() {
                    list($sql, $params) = $this->fixupParams();
                    if (!($this->stmt = db_prepare($sql)))
                        throw new InconsistentModelException(
                            'Unable to prepare query: '.db_error().' '.$sql);
                    if (count($params))
                        $this->_bind($params);
                    if (!$this->stmt->execute() || !($this->unbuffered || $this->stmt->store_result())) {
                        throw new OrmException('Unable to execute query: ' . $this->stmt->error);
                    }
                    var_dump(print $query);
                    return true;
                }

            Row 3465

                function execute() {
                    $sql = $this->__toString();
                    if (!($this->stmt = db_query($sql, true, !$this->unbuffered)))
                        throw new InconsistentModelException(
                            'Unable to prepare query: '.db_error().' '.$sql);
                    // mysqli_query() return TRUE for UPDATE queries and friends
                    if ($this->stmt !== true)
                        $this->_setupCast();
                    var_dump(print $query);
                    return true;
                }

            Another thing, i have the same problem with Tasks searches, they are there, but not everyone shows when i do some search.

            I have changed $query to $sql, it gave me a huge query, i can't work with dat haha. So, I have seen that ost__search has some kind of index/"recent history", right? What if i dont drop the table and just set reindex to 0 and run the task till 1 again? Will the system append the missing ones? Will it generate duplicated rows? I don't have anymore ideas why the Search system can't find the tickets.

              HarDBR

              As I have explained before, dropping the table deletes the table, setting reindex to 1 will make the system reindex data, and running cron will start reindexing data. You really need to setup a cron job or scheduled task so all of this is automatic.

              Cheers.

              Write a Reply...