Skip Navigation
Expand
Document ID search brings up unrelated results
Answer ID 12725   |   Last Review Date 10/18/2023

When I search by exact document ID, why do I get unrelated documents in the search results below it?

Environment:
 
  • Sites with Knowledge Advanced only
  • Any version
  • Search results
  • Manage Search Query
Issue:
 
We have a content type with a document ID prefix of "XYZ." When we search for the document XYZ123, unrelated documents appear in the search results because they mention some other article XYZ456.
 
Cause:
 
An exact document ID match bypasses the search index entirely. Searching by displays it as the first result and loads the article automatically for agents. The document appears as the first result for end-users as well when the widget parameter document_id_reg_ex is used in the search widget calls.
 
The results after the exact ID match are the regular search results of the query XYZ123. That is interpreted as the concepts XYZ and 123 separately. Since XYZ456 is interpreted as XYZ and 456, an article with that text could appear in the results.
 
Resolution:
 
Create a concept just for the prefix and disable it. See Tune Questions and Create a Concept in the documentation.
 
For example: in Manage Search Query, type in XYZ123 and tune it. You see the concepts "xyz" and "123." Select the unknown word "xyz" and choose the action "create new concept." For "enabled?" choose No. Save the concept and publish the change.
 
If your prefix is already part of an existing concept, like "DOC" matching "documentation" in English, you must first remove it as a synonym from the existing concept. Then you can add a new concept and disable just that string, if desired.