Skip to content

Find out why a search found nothing

An accounts payable clerk reports: “I searched for vouchers from Globex over $5,000, and got nothing. I know there are some.” A search that finds nothing has three suspects: the plan, the index, and the user’s security. This guide rules them out in that order.

You’ll use: the search page, the Search Test Page, the view behind the voucher search, and the Intent Store.

  1. Read the summary. It says Vouchers · Supplier: Globex · Amount: over 5,000. That’s what the clerk asked for, so the plan isn’t the problem. If the summary had said something else, such as the wrong dates, the fix would be in the prompt, as in Fix a misread phrase.

  2. Remove the filters one at a time. Without the amount, there are still no results. Without the supplier, the amount alone finds plenty. The supplier filter is what empties the search.

  3. Look at the index as the user. Sign in with the clerk’s access, and search the ZZ_VOUCHERS category for a Globex voucher’s ID on the Search Test Page, at PeopleTools > Search Framework > Utilities > Search Test Page. The voucher is there, and its title shows the supplier as Global Export Industries.

So the voucher is indexed, and the clerk may see it, but the index knows Globex only by its full name. Users know it by its short name. A contains filter matches words that start with the value, and no word in Global Export Industries starts with Globex.

Give the index both names, in a column meant for searching, and point the intent’s supplier field at it:

  1. Add a column for searching. In ZZ_VCHR_SRCH_VW, add a column, such as ZZ_VENDOR_NAMES, that holds the supplier’s name and its short name together, and rebuild the view:

    The new column, in the view's SELECT
    V.NAME1 %Concat ' ' %Concat V.VENDOR_NAME_SHORT

    Keep VENDOR_NAME as it is, for the result titles, so users still see the supplier’s proper name.

  2. Index it. Map ZZ_VENDOR_NAMES as an attribute of ZZ_VOUCHERS, redeploy the search definition, and run a full build.

  3. Point the field at it in intents/find_vouchers.yaml:

    intents/find_vouchers.yaml (changed field)
    supplier:
    attribute: ZZ_VENDOR_NAMES
    type: text
    operators: [contains]
  4. Test and release the Intent Store as a new version. The test questions don’t change: the plans still say supplier, and only the attribute behind it moved.

Ask the clerk’s question again. The summary is the same, Vouchers · Supplier: Globex · Amount: over 5,000, and now Globex’s vouchers over $5,000 appear, with Global Export Industries in their titles. A search for Global Export still finds them too.

  • The dates aren’t what the user meant. The summary shows the actual dates. If they’re wrong, the prompt needs a rule, as in Fix a misread phrase.
  • The data isn’t indexed yet. A voucher entered a minute ago appears after the next incremental build, or soon after it’s saved with real-time indexing.
  • The user can’t see it. A user with access finds it with the same search. If nobody can, check the search definition’s security; if only some users can’t, check what its document filter class returns for them, as in Follow a search, server by server.
  • A status word stands for a different code. Check the field’s values against the translate values: open in the intent must mean what users mean by it.
  • A name filter needs the whole value. equals on a name only matches the full name, so use contains for names.