ui.modern.related-document-fetch.[relatedDocumentKey].type
Background
This option can be used to fetch documents related (by way of URLs recorded as metadata values) to the primary search results.
The key includes a relatedDocumentKey
which indicates the name under which the related document will be
stored within the response.resultPacket.results.relatedDocuments
section of the data model.
The value must be one of the below forms which define the location to expect URLs of related documents:
-
metadata:METADATA_CLASS_NAME
-
related:OTHER_RELATED_DOCUMENT_KEY:METADATA_CLASS_NAME
In terms of the data model, the two above cases translate to:
-
response.resultPacket.results.metaData.METADATA_CLASS_NAME
-
response.resultPacket.results.relatedDocuments.OTHER_RELATED_DOCUMENT_KEY.metadata.METADATA_CLASS_NAME
Setting the key
Set this configuration key in the results page (preferred) or search package configuration.
Use the configuration key editor to add or edit the ui.modern.related-document-fetch.[relatedDocumentKey].type
key, and set the value. This can be set to any valid com.funnelback.config.keys.types.RelatedDocumentFetchConfig
value.
Examples
If you have a 'previousMessageUrl' field which contains the URL of the previous message in some conversation stream, the following configuration would load it under the name 'previousMessage' with each search result.
ui.modern.related-document-fetch.previousMessage.type=metadata:previousMessageUrl
If you wished to then load the previous message to that, the following configuration would load the next previous message from the related document loaded above.
ui.modern.related-document-fetch.earlierMessage.type=related:previousMessage:previousMessageUrl
This process can be repeated for many metadata classes, and many 'hops' out from the initial search result, however be aware that such lookups can become slow if many are performed for a request.