How to set up Custom Indexes in Vault

UPDATED: October 18, 2017

How do I set up Vault so that I can search on more than the default name, address, acccount, date, etc?
from the 6.1m0 e2 Vault Customizing Guide pp 125-132

Custom indexing
The search options that are presented when retrieving documents from the Vault can be
customized to suit your application requirements.
Extra indexes can also be added to those already provided. This will give extra search options
when accessing the Vault. Refer to your Vault supplier for this and other indexing options.
Changing the search options
The search option labels that are listed in the Service Client can be changed from the defaults
• Account numbers
• Names
• Addresses
• Dates under this account
All the index entries must be defined in an initialization file, and the label changed as
required. Use the database initialization file for system wide changes or the profiles
initialization file for a particular profile(s) only. You must ensure that all the index entries are
defined, as when indexes are defined in the initialization file, no defaults are assumed;
otherwise the default settings are used exclusively. Note that there are also some extra internal
index entries that must also be included.
| To change the search list options:
1. Enable custom indexing., in profiles.ini, set the CustomIndexing=1 keyword.
2. Define the indexes.
3. Add all the index entries, defining the search list label as required. Refer to the section
that follows for full details.
4. Update initialization files.
5. Ensure that any changes you have made to the database.ini and profile initialization files
are propagated
Index entry format example
Index4=invlink,,dhasb,label this is the date search option
Index5=guid,hint.guid+int.null+hint.type,dhi,GUID this is used internally
label is the text to be shown in the search list for that index.
The index numbers must be sequential starting at '1'. a missing number indicates the end of
the indexes; any subsequent indexes will not be used.
Render entry format example
Example database.ini entries:
Index5=contract,hint.invoice,dh,Invoice Numbers
Index6=wayg,WAY,dh,Way Bills
Index7=invlink,,dhasb,Dates under this account
Index8=pol,PO,sadh,Purchase Order under this account
Index9=ordl,ORD,sadh,Order Number under this account
Render5=Invoice Number;Customer;Date,hint.invoice;hint.account;
Render6=Way Bill;Customer;Date,WAY;hint.account;
Render8=Purchase Order;Date,PO;
Render9=Order Number;Date,ORD;
Index Flag Descriptions
Flags Internal Variable Description
a PrefixAccount Prefixes the user's search key with
[account][0]. This index is used to
search for data associated with a
particular account (document names,
and purchase orders).
m MultipleValues Add multiple keys if more than one
copy of the attribute is present. When
adding keys based on custom
attributes, look for multiple copies of
that attribute and add each one
separately. NOTE: The maximum
number of multiple instances is
limited by the following profile
setting (default is 8):
s AccountMustBeSelected This flag tells the client that an
account must be selected in order for
the search to appear in the list of
available searches.
h LinkByHintRecord Match ends with [0][hintfile
name][0][hintfile offset].The keys in
this index point to documents.
c LinkByCustomerRecord The keys in this index point to
accounts. Match ends with
[account.drr offset].
p DisplayPage If the index points to a document
using a custom attribute, switch to
the page associated with that
d DisplayDocument When selected, display the first page
of the specified document.
t DisplayNewestDocument Displays the most recent document
for the account (whether the index
points to a document or account).
r RotateStrings Adds multiple “rotations” of the key
field to the index, each version
starting at a new word within the
value. For example field “JOHN
SMITH” would add versions “JOHN
SMITH” and “SMITH JOHN”. This can
be used to search within a key field
which is useful for names and
addresses. In a name index for
example you could search for first or
last name. NOTE: The maximum
number of rotated values (option r) is
limited by the following profile
setting (the default is 8):
b SearchBackwards Shows the search results in reverse
order (helpful for the date index - it
will show most recent first).
i InvisibleToUser Sets the index as invisible to the user.
u UpdateOnCustomer Add this key only if the customer
record changes. This is an
optimization for fields that use the
customer record, it avoids the effort if
it did not change).
l LeaveOnUnindex Do not remove this key when the
print file removed from the Vault
(fields that point to the customer
record should still be usable when a
single print file is removed).
Index Flag Descriptions
Flags Internal Variable Description
Flag Scenarios
Below is an example of possible scenarios that can be created with the use of multiple flags:
Top level index that points to an account (name, account, and address)
• points to a customer
• shows the most recent document when selected
• add only if the customer record changed
• leave this key when documents are removed
• use only fields
Top level index that points to a document (invoice number and purchase order)
• points to a document
• shows this document when selected
• uses only fields or custom attributes
j JumpOnSingleMatch If a single search value was returned,
automatically select it (if you enter a
unique matching search, that result
will immediately pop up, otherwise it
will wait for the user to click on the
single result listed).
w WebAccountIndex Web scripts can use this index to
check the existence of accounts (this
is used sometimes by custom web
scripts that need to know which index
will tell them whether an account
number is valid).
Index Flag Descriptions
Flags Internal Variable Description
An index that points to documents under an account (dates under this account, invoice
numbers for this account)
• points to document
• shows this document when selected
• an account must be selected before the search should be available
• the key's value is associated with a specific account
• uses only fields or custom attributes
Common Options
Below are examples of options that are commonly used for indexing.
b – List backwards: shows the results in backwards order.
j – Autoselect: automatically select the match when only one matching result is found.
r – Search within the field: add “rotated” versions (e.g. JOHN SMITH would add “JOHN
Uncommon Options
Below are examples of options that are not commonly used for indexing but can be used if
deemed necessary.
i – Do not show this to the user: this index is invisible to the user.
m – Multiple values of a custom attribute: add each specified copy of the custom attribute to
the index.
w – Mark this as the account index for web scripts: marks the index that can be used by web
scripts to validate account numbers.
Multi database Support for Extended Indexing
Index entries can be put in a separate database. Separate databases are implemented as
sub-directories of Server\Index. You can also use Database=dbname or Database=dbname1,
dbname2, or Database=* in the profile.
If indexfilename has a database\filename form, then use this database
Database Suboptions
profiles.ini on server:
To indicate the use of a default database:
To indicate the use of a single database:
To indicate the use of multiple databases:
To indicate databases specified by journal
in journal:
Field names used by the custom indexer
From the customer record:
Usually Populated
Parameter Description
int.null single 0 byte single space
int.format format string for the file being indexed
int.documents hinter string for the file being indexed.
Parameter Description
int.pointer the pointer in the index record
int.empty an empty field
iint.file the file the document is in.
Attributes can have any name without white space or punctuation and are stored in the report
list of the hint record.
Note: Multiple add when using Index5=somedb\invlink.idx, can be slow. For example, when
you specify Database=dbname1, dbname2 in the profile, this entry will still be added to the
specified database but it will try to add it twice (this will not result in a duplicate, however it
wastes time).

Environment Details



  • No Downloads