Function documentationKnowledge Base Compilation

 

The Knowledge Base Compilation application is used to compile the knowledge bases of the Software Agent Framework (SAF), which are searched by a TREX-based search engine or external search engine, depending on how the external search engine is integrated in the SAF.

If you integrate an external search engine in the SAF by extending the ABAP class CL_CRM_SAF_SE_GENIL in the Object Navigator (transaction SE80), you can use the Knowledge Base Compilation application to compile the knowledge bases linked to that search engine. If you integrate an external search engine in the SAF using Business Add-In BAdI: External Search Engines in Customizing, you cannot use the Knowledge Base Compilation application to compile the knowledge bases linked to that search engine because there is no implementation of the compilation processes.

Compilation

For the search engine to find documents in a search, the knowledge base must first be compiled in the language in which it is to be searched. Compilation creates an index of documents whose content and attributes are extracted from the records in the knowledge base. When new records are created, or existing records changed, the knowledge base must be recompiled. The knowledge base should therefore be compiled regularly. Regular delta compilation can be scheduled as a background job (see Features below). If regular delta compilation is not scheduled as a background job, or if delta compilation is not supported for a knowledge base, you must initiate compilation manually.

Integration

Compilation Dependencies

You can define a compilation dependency between two or more knowledge bases. As a result, if you carry out a full compilation or delta compilation of the master knowledge base, a full compilation or delta compilation of all dependent knowledge bases is carried out automatically to ensure data synchronization and consistency. You can define compilation dependencies in the Customizing activity Name and Configure Knowledge Base.

On the Compile Knowledge Bases screen, dependent knowledge bases are indented below the master knowledge base to which they are assigned. It is not normally necessary to compile a dependent knowledge base on its own; however, it may be necessary if compilation of the master knowledge base was successful, but compilation of the dependent knowledge base failed. After resolving why compilation of the dependent knowledge base failed, it may be more convenient to recompile only the dependent knowledge base (rather than the master knowledge base and all dependent knowledge bases), particularly if the master knowledge base contains many documents and compiling it would take a significant time.

Supported Languages

Only the languages supported by the search engine can be compiled. For more information, see Software Agent Framework (SAF).

File Formats of Attachments

Only the file formats supported by the search engine can be compiled for attachments. For the file formats currently supported by TREX-based search engines, see SAP Note 663630.

Performance

Performance is dependent on the performance of the search engine and data communication between the SAP server and search engine server.

Prerequisites

For TREX-based search engines, TREX must be installed. For information on the TREX release required by the SAF, and where to find the necessary documentation to install TREX, see Software Agent Framework (SAF).

The knowledge base must contain records.

Features

Compile Knowledge Bases Screen

The Application field shows the application to which the displayed knowledge bases are assigned. Knowledge bases are assigned to an application in the Customizing activity Configure Application.

The Actions field can have the following possible values:

Delta Compile

Compiles all new and changed documents since the last compilation, and removes deleted documents from the index. If a database needs periodic or heavy modification, it may be more convenient to use this option because, for example, you could compile all the documents in a single run at the end of the day. See also Start Background Job below.

Full Compile

Compiles all documents. This option is recommended initially and if the index is corrupted.

Delete Index

Deletes the index from the search engine. This is recommended if the index is corrupted or does not contain the correct number of documents. To restore the index, a full compilation must be carried out before carrying out a delta compilation.

Start Background Job

For a regular delta compilation, it is convenient to schedule a background job. The delta compilation is carried out at the interval you specify in the compilation log (for example, every 7 days). You can start the background job either from the compilation log or on the Compile Knowledge Bases screen.

Stop Background Job

See Start Background Job.

Compilation Log

The timestamps and status of existing indexes are stored in the compilation log. This information helps you to detect failure or corruption in indexes, and to take action such as recompiling an index.

If a lengthy full compilation fails, you can choose Resume Full Compilationto start compiling the knowledge base from the last failed record. This works correctly only if the knowledge base has not been changed since the last failed full compilation.

You can cancel any compilation tasks that are queued or in process. When you cancel a queued task or a task in process, all subsequent tasks are also cancelled. For example, if four tasks are displayed in the queue, and you cancel the second task, the system also cancels the third and fourth tasks, but not the first task.

You can schedule how often the background job for regular delta compilation is carried out (see Start Background Job above). After changing and saving the schedule, you must stop and restart the job in order for the change to take effect.

Set Up Knowledge Bases Screen

Only the knowledge base SDB needs to be set up, but this is done automatically the first time that the knowledge base SDB is compiled. The Set Up Knowledge Bases screen is used only to set up the knowledge base SDB if it is corrupted or incorrect. If you set up the knowledge base SDB, be sure to delete the old index afterwards.

Activities

Accessing the Knowledge Base Compilation Application

You can access the Knowledge Base Compilation application:

  • In the Interaction Center (IC)

    • Select the IC Manager or related business role.

    • On the navigation bar, click Knowledge Management.

    • Under Create, click Knowledge Base Compilation.

  • From the SAF diagnosis tool (for more information, see Software Agent Framework)