Enable Search by Document ID

You can enable users to bypass the search results list and open an article directly in the article detail page by entering its document ID in the search field. The current implementation contains the search by document ID feature by default. If you upgrade from a previous implementation, you can add search by document ID by modifying the results page.

  1. Edit the file:

    cp/customer/development/views/pages/results.php
  2. Add the document_id_reg_ex parameter by changing this line:

    <rn:container source_id="OKCSSearch"/>

    to:

    <rn:container source_id="OKCSSearch" document_id_reg_ex="^[\p{L}\p{Nd}_.]*\d{1,10}$"/>

  3. Add the doc_id_navigation parameter to open an article directly in the article detail page.

    <rn:container source_id="OKCSSearch" document_id_reg_ex="^\w{1,10}\d{1,10}$" doc_id_navigation="true"/>