powered by CADENAS

Manual

Manual

1.3.9.9.3.9.  Updates of ERP search index

The AppServer knows all changes to the database so that it can react with updates of the LinkDB search index or client notifications at project changes and/or role changes.

If the option Catalog browsing and search with AppServer is chosen (meaning not Catalog browsing, search and database with AppServer automatic updates of the LinkDB search index work anyway. This is possible, because a "Task" can be configured on the AppServer, which continuously updates the LinkDB search index (with the help of LOGTABLE information).

An older concept (up to V9.08) is using the script nightupdate_erp.vbb for index updates. It ensures that the ERPTABLE is integrated into the full-text search index (=Lucene index). (Optionally, can also be used in V10.) (Details can be found in the script itself.) The advantage of the AppServer solution is that only those parts of the LinkDB search index are updated, where data has been changed. If there are no special causes the nightupdate_erp.vbb is not needed in V10 anymore.

Tasks

  • DBSearchIndexTask:

    • Task interval for updating the ERP search index. The Task checks the LOGTABLE whether there are new entries available. If yes, the ERP search index is updated

    • If the value is set, then after a catalog update the search index is automatically updated.

      If you do not want an automatism at this place, but initiate it manually, then do the following:

      1. Remove the value "DBSearchIndexTask" from the key "Tasks".

      2. plinkcommon.cfg -> key UPDATESEARCHINDEX

        Set the value on 1.

        -> Now, when starting the catalog update a message is displayed, whether you want the ERP search index to be updated automatically after the installation.

        Do you want to update the ERP search indexes automatically after installation?

        Do you want to update the ERP search indexes automatically after installation?

      On this also see Section 4.17.9, “ Update full-text search index / plinkcommon.cfg -> Block [Common] -> Key "UPDATESEARCHINDEX" ”.

  • DBClearLogTask: Task interval for clearing the LOGTABLE. This Task deletes all entries from LOGTABLE.

Detailed information can be found in the following section.

1.3.9.9.3.9.1.  Logging of LinkDB changes

INSERTS, DELETES and manual UPDATES (by PARTlinkManager or PARTdataManager) are automatically logged in the table LOGTABLE.

Structure of LOGTABLE

LOGID VARCHAR(40) NOT NULL,
TABNAME VARCHAR(15) NOT NULL,
KEYFLD VARCHAR(15) NOT NULL,
LOGKEY VARCHAR(500) NOT NULL,
LOGEXT VARCHAR(64),
LOGTIME VARCHAR(20) NOT NULL,
USERNAME NVARCHAR(20),
HOSTNAME NVARCHAR(20),
PROGNAME VARCHAR(15),
MODTYPE SMALLINT DEFAULT 0 NOT NULL,
UPDSEARCH SMALLINT DEFAULT 0 NOT NULL,

You can view this table via PARTlinkManager -> Extras menu -> Database -> Edit additional tables.

If in plinkcommon.cfg under ADDITIONALTABLES the entry LOGTABLE has been set it is displayed here.

If in plinkcommon.cfg under ADDITIONALTABLES the entry LOGTABLE has been set it is displayed here.

Meaning of single LOGTABLE columns

  • LOGID: LOGID is an unique number (GUID)

  • TABNAME: Table, where changes are stored, meaning ERPTABLE or LINKTABLE.

  • KEYFLD:

    • For ERPTABLE this is always ERP_PDM_NUMMER and LOGKEY contains the ERP number

    • For LINKTABLE this is always PRJ_PATH and LOGKEY contains the path

  • LOGEXT: Additional information. At LinkDB changes this is version and line ID.

  • LOGTIME: Time of change (in UTC)

  • USERNAME: Login name of user, which performed the change

  • HOSTNAME: Computer name of client

  • PROGNAME: Program, where changes have been performed

  • MODTYPE: Modification type

    Value range:

    • 1: Insert (dataset has been added)

    • 2: Update (dataset has been changed)

    • 3: Delete (dataset has been deleted)

    • 4: Installation (updates during cip installation)

  • UPDSEARCH: If UPDSEARCH is 1 then the ERP search index should be updated. Will be turned back to 0 by the AppServer after finished update

In order for the task to be performed the following settings have to be made in the configuration file pappserver.cfg.

Example:

[TaskManagerModule]
TimerInterval=60 
tasks=loadAll 
DBSearchIndexTask=1h
DBClearLogTask=24h

[DBClearLogTask] 
DaysToKeep=365

  • TimerInterval: Specification in which interval (seconds) it shall be checked whether a new task is pending. Normally this does not have to be adjusted.

  • tasks:

    Value range:

    • loadAll: All Task Modules shall be loaded when launching the AppServer. Currently there are only two:: DBSearchIndexTask and DBClearLogTask

  • DBSearchIndexTask: Task interval for updating the ERP search index. The task checks the LOGTABLE whether there are new entries available. If yes, the ERP search index is updated.

  • DBClearLogTask: Task interval for clearing the LOGTABLE. This task deletes all entries from LOGTABLE.

    Possible date formats:

    1m Task is executed every minute
    1h Task is executed every hour
    13:21z Task is executed every day at 13:21 GMT
    mon 14:30 Task is executed every Monday at 14:30 (locale time)

  • DaysToKeep: Number of days to store the entries in the LOGTABLE.

[Note] Note

The exact timing with nightupdate.vbb (update of ERPTABLE) has to be regarded.

1.3.9.9.3.9.2. Manual update and initial creation of LinkDB search index


[20] Exact time depends on the environment (network, processor, disk, etc.).