Troubleshooting Text Searching

If text searching in the Quick Search pane 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.

Quick Search pane with Text search box

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.
    Custom search showing details of search criteria
  4. Make sure the search did not return a huge number of results, near or above 100,000. Searching words that appear in so many records can reach the maximum allowed response time for the search engine (controlled by FTS Response Time), at which point the search returns the most recent records it found, and stops processing additional results. In these cases, make your text search more exact to narrow the possible results, such as adding a user's login in addition to their name. Adding separate filters to the search does not affect the processing difficulty of a vague search term.

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 only partially indexed for full-text searching, so you might not 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 using this one-string Beanshell script in the Admin Console, replacing PROJECT with your project name:
com.supportwizard.utils.TryTimer.getFTSStatus(com.supportwizard.dictionary.interfaces.Project.service().findByName("PROJECT").getID());

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;
      import com.supportwizard.utils.TryTimer;
      //////////////////////////////////
      // change name of the project here
      //////////////////////////////////
      String PROJECT_NAME = "Demo";
        
      Seance seance = SeanceFactory.constructAdminSeance(PROJECT_NAME);
      String out = "===Before===\n" + TryTimer.getFTSStatus(seance.getProjectID());
      FTXChecker.service().fullRecreate(seance, true);
      out = out + "\n===After===\n" + TryTimer.getFTSStatus(seance.getProjectID());
      seance.destroy();
      out;
    • 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.

Check for Stopwords

Certain very common words are in the Agiloft database's "stopwords" list, which prevents them from returning results on full-text search in your KB in order to protect system performance. This is the list of stopwords:

0
1
2
3
4
5
6
7
8
9
a
all
am
an
and
any
are
as
at
be
by
can
co
come
did
do
does
doing
done
email
for
from
go
got
has
have
he
https
I
if
in
inc
is
it
its
ll
me
mr
mrs
ms
mz
no
not
of
on
or
s
she
so
t
take
test
that
the
them
then
they
this
to
too
type
up
us
use
used
user
variant
varied
varies
variety
various
vary
varying
ve
was
we
went
were
what
when
who
will
with
write
yes
yet
you

These words can still be searched using the "search for string" option.