You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Troubleshooting Text Searching

If searching on -TEXT- in the main search block returns unexpected results, you might have an issue with your reverse index, or revindex. This does not apply to searches with the String option selected.

Some examples of unexpected results might include:

  • If you search a phrase, the results might not return a record that does in fact include that phrase. For example, if you search a phrase from the description of record 45 and the results don't include record 45, you likely have an issue with the revindex.
  • If you search for a word with the Context option selected, the results might return a record that does include the word, but the context shown might highlight a different word.
  • If you search for a word with the Context option selected, the results might return a record without showing any context at all, and the record might not include the word anywhere.

Prerequisites

Some of these troubleshooting steps require access to the admin console. One also requires comfort using the BeanShell debugging tool.

Troubleshoot the Search

Before you begin, investigate the details of your search to make sure an expected result is missing due to error. In some cases, the system might interpret your search differently than you expected.

  1. Run the search again, or navigate to the search results you have.
  2. At the top, click Click for details.
  3. Make sure the system actually searched for the terms you expected it to find in the record. For example, a -TEXT- search for "We used the qqtest template" actually searched only for "template," because the first three words were exceedingly common and "qqtest" is not present in the system.

If you determine that the search still failed to return an expected result, or you still see issues with the context excerpts, continue to the steps in the next section.

If you expect to find a record based on searching the content of an attached file, check your system setting for the max_file_size_to_fts_index global variable. Files larger than the max size specified in this global variable are not indexed for full-text searching, so you won't find results based on that content unless you adjust the variable setting or reduce the size of the files.

Update the Record

Once you identify an issue with revindex, try updating the record:

  1. Find the problem record and open it for editing.
  2. Make an update and save the record. This should prompt the system to sync the record with revindex.
  3. After you save the record, wait for one minute.
  4. Retry the search.

In many cases, there was an issue with the specific record, and forcing sync fixes the problem.

Check Revindex Sync Service

If updating the record doesn't fix the issue, there is likely a problem with the sync service that should have been prompted by the update.

  1. Log in to the admin console.
  2. Go to Setup > Background Services.
  3. Check the status of REVINDEX_SERVICE.
  4. If the service is not running, turn it on.

If the service wasn't running, it can take some time for the system to process the full sync queue. You can see the sync queue by replacing SERVER and PROJECT with your system's server and project name in this URL: https://SERVER/gui2/tests/ftsstatus.jsp?kb=PROJECT

When the revindex queue size shows 0, you're ready to retry the search.

Rebuild Revindex

If you aren't able to resolve the problem, you can force the system to rebuild the index entirely. This requires access to the admin console and comfort using BeanShell debugging.

  1. Copy the appropriate BeanShell code.

    • If your system is on version 2019_01 or later, copy this code:

      import com.supportwizard.seance.Seance;
      import com.supportwizard.seance.SeanceFactory;
      import com.supportwizard.search.interfaces.FTXChecker;
      //////////////////////////////////
      // change name of the project here
      //////////////////////////////////
      String PROJECT_NAME = "Demo";
       
      Seance seance = SeanceFactory.constructAdminSeance(PROJECT_NAME);
      FTXChecker.service().fullRecreate(seance, true);
      seance.destroy();
    • If your system is on version 2018_02 or older, copy this code:

      import com.supportwizard.seance.*;
      import com.supportwizard.utils.*;
      import com.supportwizard.search.ejb.interfaces.*;
      //////////////////////////////////
      // change name of the project here
      //////////////////////////////////
      String PROJECT_NAME = "Demo";
       
      Seance seance = SeanceFactory.constructAdminSeance(PROJECT_NAME);
      HomesGetter hg = new HomesGetter(System.getProperties());
      FTXChecker checker = hg.getHome("com.supportwizard.search.ejb.interfaces.FTXCheckerHome").create();
       
      checker.fullRecreate(seance);
       
      checker.remove();
      seance.destroy();
  2. Paste the code into a text editor like Notepad.

  3. Replace "Demo" with the name of your project.
  4. Log in to the admin console.
  5. Go to Debugging > Debugging.
  6. Click Bean Shell.
  7. Paste the code from the text editor into the bean shell window and run it.

The system rebuilds the index in the background, but while it's being rebuilt, full-text searching might not return results as expected. When you run a text search, the system shows a warning message if the KB isn't fully indexed yet. You can check indexing progress by following the relevant steps in Indexing.

  • No labels