Directory indexing
We will present here a simple example of indexing users and directory locations.
Indexing of users
Configuration
Indexing class
com.axemble.axvdocsearch.extensions.base.implementation.BaseDirectoryUserIndexExtension
Custom Tags « systems »
CustomTag | Description | Type |
---|---|---|
ID | text | |
REFERENCE | text | |
PHOTO | Http link to the user’s photo specified in the directory | text |
ORGANIZATION.ID | User’s organization identifier | text |
ORGANIZATION.NAME | Name of the user’s organization | text |
ORGANIZATION.PATH | Path of user’s organization | text (tree) |
LOCALIZATION.ID | User location identifier (if present) | text |
LOCALIZATION.NAME | Name of the user’s location (if present) | text |
LOCALIZATION.PATH | Path of the user’s location (if present) | text (tree) |
List of supported values in customtags (case sensitive):
Attribute name | Description | Type |
---|---|---|
ActivationDate | Account activation date | date |
Address1 | Address | text |
Address2 | Address (continued) | text |
Birthday | Date of Birth | date |
City | City | text |
ContractType | Type of Contract | text |
Country | Province/Country | text |
text | ||
EmployeeNumber | Employee Number | text |
Entry | Date of Entry | date |
Exit | Date of departure | date |
Expiration | Account Expiration Date | date |
FaxNumber | Fax | text |
Language | Language of User | text |
LastName | Name | text |
LastVisit | Date of last visit | date |
Login | Login of user | text |
MobilePhoneNumber | Mobile | text |
PhoneNumber | Home Phone | text |
Sex | Sex | text |
Skin | Skin | text |
SocialCategory | Occupational Category | text |
TimeZone | Timezone | text |
Title | Title | text |
UserFunction | Function | text |
Zipcode | Postal Code | text |
Required input parameters
Parameter Name | Description |
---|---|
CONTEXT_LOGIN | Login used to browse data to be indexed |
ORGANIZATION_NAME | Name of an organization to filter the users to be indexed |
ORGANIZATION_NAME_WITH_CHILDREN | Organization name to take members of the organization and its child organizations (available from version 5.6.8 onwards) |
GROUP_NAME | Name of a group to filter the users to be indexed. Note: If the group filter is enabled, you must also pass the “organization name” attached to that group. |
An example of XML configuration
In this example we index all the users.
Here is a possible XML configuration:
<indexes>
<index name="caseBaseDirectoryUserIndexExtension"
label="LG_caseBaseDirectoryUserIndexExtension"
controller="com.axemble.axvdocsearch.core.controllers.implementation.LuceneController"
extension="com.axemble.axvdocsearch.extensions.base.implementation.BaseDirectoryUserIndexExtension"
indexStorePath="XtendedSearch\caseBaseDirectoryUserIndexExtension"
updateOnIndexedDocuments="true"
locales="fr" >
<parameters>
<parameter key="CONTEXT_LOGIN" value="sysadmin" />
<parameter key="ORGANIZATION_NAME" value="" />
<parameter key="GROUP_NAME" value="" />
</parameters>
<customtag name="login" type="text" />
<customtag name="Email" type="text" />
<customtag name="LastName" type="text" />
<customtag name="FirstName" type="text" />
<customtag name="directline" type="text" />
<customtag name="ORGANIZATION.NAME" type="text" />
<customtag name="ORGANIZATION.LABEL" type="text" />
<customtag name="LOCALIZATION.NAME" type="text" />
<customtag name="LOCALIZATION.LABEL" type="text" />
</index>
</indexes>
Note on locations: extended attributes can be indexed
Indexing of locations
Configuration
Indexing class
com.axemble.axvdocsearch.extensions.base.implementation.BaseDirectoryLocalizationIndexExtension
Required input parameters
Parameter Name | Description |
---|---|
CONTEXT_LOGIN | Login used to browse data to be indexed |
PARENT_LOCALIZATION_NAME | Name of a parent location to filter the locations to be indexed |
An example of XML configuration
In this example we index all the locations.
Here is a possible XML configuration:
<index name="IndexAllLocalization"
label="LG_IndexAllLocalization"
controller="com.axemble.axvdocsearch.core.controllers.implementation.LuceneController"
extension="com.axemble.axvdocsearch.extensions.base.implementation.BaseDirectoryLocalizationIndexExtension"
indexStorePath="XtendedSearch\IndexAllLocalization"
updateOnIndexedDocuments="true"
locales="fr" >
<parameters>
<parameter key="CONTEXT_LOGIN" value="sysadmin" />
</parameters>
<customtag name="extendedAttribute" type="text" />
<customtag name="label" type="text" />
</index>
Note on locations:
- We can index extended attributes.
- It is possible to index the getter of the object ILocalization (only one level of introspection) for “getLabel()” we will use “label” as customtag.
Sources :