4.5.Indexing profiles

With R2EdiViewer, EDI files (not XML/native files) can be indexed in BATCH mode
via the start parameter -IP.
A quick search is then possible from any PC via the File --> Index search menu,
that has access rights to the index directory and the EDI files.

An indexing profile is used to determine:
- which EDI files are to be indexed.
- which field contents, in addition to file name, file format and file date, are to be determined from the EDI files
  and are to be included in the index as indexing fields / search fields.
- in which directory the index files are located.
- when index entries that are no longer required can be deleted.

An indexing profile is always required, even for PCs that have not created the index,
are not the index owner, but only want to access the index via the index search.
This indexing profile must be identical to the profile used for index creation
with the exception of the directory details for the EDI data and index files.

Via the customizing menu Indexing profiles --> Configuration
a maximum of 9 different indexing profiles can be created.

Profile 1 is an example default profile and determines a total of 8 indexing fields from
EDIFACT, IDoc and VDA files, e.g. sender, receiver, document number
(invoice number, delivery note number, delivery call-off number, shipment number, etc.).

The indexing fields cannot be changed from profile 1.
But you can copy profile 1 and then adapt it.

4.5.1. Buttons

Button

Meaning

SAVE

Changes to the current profile are saved.

COPY

The current profile is copied to a new profile.

RENAME

The current profile is renamed.

DELETE

  1. After a confirmation prompt, the index files in the index directory are deleted.

    The index files can only be deleted by the index owner, i.e. the PC that created the index.
    The index owner is identified by the computer ID (see Help --> Info menu),
    which is entered in the indexing file IndexOnwer.txt when the index is created.

  2. The current profile is deleted after a security prompt.

    Profile 1 cannot be deleted.

VALIDATE

The profile must be validated before it can be used. This applies both to the index owner and
to PCs that only want to perform an index search.

During validation:
- it is checked whether access to a maximum of 10 directories works
- it is checked whether a maximum of 10 EDI data can be read and indexed
- the search fields for the index search are determined

If validation by a non-index owner is successful, the status changes to "Active"
as the index already exists.

CLOSE

Close dialogue without saving any changes.


4.5.2. Status display

Status

Meaning

The profile is new.
It can be set up and customized accordingly.

The next process step, validation, has not yet been carried out.

The profile is valid and the index owner can start an indexing run with the
startup parameter -IP.

Indexing (start parameter -IP) was performed with the profile.
The index contains 1.295.745 entries. 

With an active profile, the index directory and the start directory of the EDI files
can no longer be changed by the index owner.

The data selection instructions have been changed for an active profile
with indexing data. A new validation is required.

Remark:
If the names of the "IDX" indexing fields have been changed due to the modified
data selection instructions, it is no longer possible to search using
the old "IDX" fields when performing an index search.

4.5.3. Indexing settings

Input field

Meaning

Selected indexing profile

Selection of an existing profile.

Index files directory

Base directory for storing the indexing files. 
A subdirectory IP1 - IP9 is created for each profile.

Performance:
For optimum performance, indexing should be carried out from the PC
where the EDI files are located.
This means that the index directory should also be located locally
on the same computer, e.g. on the local drive C: or D: if available.

If the EDI files and index files are on the same PC,
drive mapping from other PCs is also easier.

Example:
In the example shown, the EDI files and the index files are located
on the same PC, but indexing is carried out by another PC that has access
to the server via the G: drive.

File search filter

The EDI files to be processed can be restricted via the file name and
the file format.

Example:
All EDI files/formats are processed by default.

File date

As the central selection field, the file date determines which
EDI files are to be indexed:

0 File date is not used
1 Manual file date selection
2 Starting from the last indexing run
3 Starting at midnight the day before

Selection 2 is the default setting.
All files since the last indexing run up to today, current time minus 2 minutes,
are indexed. For the very first indexing run, the starting year is 1977.

To prevent indexing gaps, e.g. due to the time changeover,
from the time stamp of the last indexing run:
- 10 minutes are subtracted
- 60 minutes are subtracted,
   if the last indexing run was more than one hour ago. 

Start directory

Defines the base directory where the search for EDI files to be indexed is started.

The base directory is not part of the index.
The index search field "File name" therefore only contains all subdirectories and
then the EDI file name.

Use the file date to
restrict subdirectories

If subdirectories are to be searched,
the modification date of the subdirectory is checked.

The files and subdirectories contained in the subdirectory are only searched
if the modification date is valid.
This increases the indexing speed if directories do not need to be searched at all
because their modification date is not invalid.

Whether the modification date of subdirectories is valid is derived from the
"File date" period as follows:
- Start date minus 1 day, 00:00 = previous day
- End date plus 2 hours

Reorganize index entries
oder than (days)

Index entries are deleted if the EDI file date is older than the specified days.

If an index contains many entries because they reach far into the past,
and the index is accessed via the network, you could create another index
where the index entries are deleted after 6 months, for example.

Example:
The index entries are deleted after 10 years.

4.5.3.1. Report fields / indexing fields / search fields

By default, 3 indexing fields are created for each EDI file, which are then available
as search fields in the index search:
- File name (containing any existing subdirectories and the file name)
- File format
- File date

"File size" is also included in the index, but cannot be searched for.

Indexing fields from the EDI data are added via data selection instructions.
The input syntax is identical to a layout data selection file.

Report field --> Indexing field

A report field is used as an indexing field if the report field name contains "IDX_".

Indexing field --> Search field

In the "Index search" dialogue, the IDX report field is used for the search field label, in which:
- all characters up to and including "IDX_" are removed
- all underscores are removed

This means that " C_IDX_Interchange_Sender_ID " in the index search becomes "Interchange Sender ID".

C-fields and ValueAppend

In the default profile only C-fields with ValueAppend are used for indexing.
This means that a new line is not created for each material item, for example, but that
all article numbers are concatenated into the field C_IDX_Material_number.
Ideally, an EDI file then consists of one indexing line.

Of course, several indexing lines can be created per EDI file if, for example:
- the length of the content of a report field exceeds 1000 characters
- an IDoc file contains several IDocs

This means that the number of entries in the index is not the same as the number of indexed EDI files.

4.5.3.2. Validate

After validation, the indexing lines of max. 10 files are displayed.
This allows the data selection instructions to be checked to see whether the indexing fields
have the expected content.