Directory data sources
A directory data source gathers data from a directory service such as Active Directory or LDAP using Java’s JNDI system. Funnelback uses a query (generally an LDAP style query) to select the desired directory entries, and each entry is saved as an XML file.
Configuring a directory data source
Create the data source
Directory data sources are created by following the data source creation steps and selecting directory from the list of data source types.
A directory data source is defined by configuring the following properties:
-
URL to the directory
-
search base from which to begin the directory search
-
search filter to select directory entries with
-
exclude rules to exclude selected directory entries
Note that some directory servers are configured to limit the number of results which can be returned for a query. Since Funnelback must be allowed to gather a complete set of directory entries it may be necessary to configure your directory server to permit this. See OpenLDAP : Limits for documentation on configuring the OpenLDAP directory server to support this.
After creating the data source, perform an initial update of the data source.
Define LDAP field mappings
After a successful update has run configure metadata mappings for the LDAP fields. The update of the directory data source downloads each entry from LDAP and converts it to an XML record.
The fields that were detected in the LDAP records should be listed amongst the XML sources. Map the relevant fields to metadata classes. Relevant fields include:
-
fields that you wish to display in the search results summaries, or use for faceted navigation.
-
fields that contain information (such as office location, topics of interest, keywords) that make it easier to find the record.
-
If there is a field containing a URL that should be used as the target when the result is clicked on then this should be mapped as the document’s URL using the advanced XML configuration options available from the data source configuration screen in the search dashboard.
Rebuild the index by running an advanced update to rebuild the live index.
After the reindex is complete metadata should be available for display in the search results.
Configure search results
Search results can then be configured. This involves:
-
Defining the metadata classes to return as part of the search results by setting the summary fields (
-SF
) query processor options. -
If using a Freemarker search template, customizing the template to display the metadata fields in the search results template within the
<@s.Results>
code block.
Live links
By default, the URL used in a directory data source is a system-generated URL. If the system-generated URL is not modified (for example by filters) the modern UI will use the cache link as the live URL. This will result in the XML of the record being shown to the user when a result is clicked. You can use XSLT on the cache controller to style the response.
Modifying directory records
Directory records can be modified (locally) prior to indexing using the filter framework.