Attachments

Dovetail Seeker can optionally index Dovetail CRM entity file attachments. When configured to index attachments for a Dovetail document specification file attachments which are found and that the indexer has read access to will have their text extracted and put into a new document in the search index. Each attachment document has a reference to it's parent.

Index Attachment Configuration

To find related Dovetail CRM entity attachments the dovetail document specification has an indexAttachment element with a path attribute whose value defines the path from the Dovetail CRM entity to its related attachments.

This value of the path attribute shows the indexer how to traverse from the entity being indexed to the doc_inst table where attachment records are found.

Security Note: To be able to index attachment contents. Dovetail Seeker indexing 
applications must have read access to all Dovetail attachment file paths.
Example

The following example index attachment element configuration specifies the path from the Dovetail CRM case entity to the doc_inst table.

<indexAttachments path="case_attch2doc_inst"/>

Example Case specification with attachments
<dovetailDocumentSpecification description="Cases in your CRM." tags="workflow">
  <identification displayName="case" table="case" idColumnName="id_number"/>
  <documentSelectionCriteria><![CDATA[creation_time > ${lastIndexUpdate} OR modify_stmp > ${lastIndexUpdate}]]></documentSelectionCriteria>
  <title xml:space="preserve"><path>title</path></title>
  <summary xml:space="preserve"><path>case_history</path></summary>
  <indexAttachments path="case_attch2doc_inst"/>
  <contents>
    <path>title</path>
  </contents>
</dovetailDocumentSpecification>
Attachment Index Documents

When the index attachments configuration element is present Dovetail Seeker will create attachment file documents for each of attachment related to the Dovetail CRM entity being indexed.

Attachment Fields
Identification Fields
Scheme

All Dovetail Seeker documents have a scheme field. Attachment documents have a scheme field value of file.

Domain

All Dovetail Seeker documents have a domain field. Attachment documents have a domain field whose value is attachment.

Id

All Dovetail Seeker documents have a id field. Attachment documents have a domain field whose value is the full filesystem path to the attachment.

Attachment For

All attachment file documents have field named attachmentFor whose value is the type of entity the attachment references. For example, an attachment document created by the case document specification will always have an field named attachmentFor whose value is case.

Dovetail Reference

Additionally each attachment file document will have a field named dovetailReference whose value will be the search index URI of the parent Dovetail index document. For example an attachment document created for the Dovetail CRM case entity whose id is "42" will have a URI of dovetail://case/42. Search clients can use this reference value to easily construct a application link to the parent entity in your CRM application.

Parent Document Custom Fields

For certain situations you may wish the custom fields defined in your document specification to be present on your attachment documents. When attachment documents are created all custom fields from the parent search document are copied into the attachment index document. This is done to keep custom fields from your Dovetail documents in context with their attachments.

Example

Search clients often secure access to index documents by filtering search queries. For example it is common to filter out non-public Dovetail CRM solutions documents from public facing knowledge base searches. Your self service application will want to filter the out of the box Solution document specification with a query like this:

((public:1 AND domain:solution) AND <user query>)

This filter will prevent private solutions from leaking out of your search queries. Now because your solution attachment documents will also have their parent document's custom fields you can change your filter to look like this:

((public:1 AND (domain:solution OR domain:attachment)) AND <user query>)

This filter will now include solutions and their attachments in search results.

File Document Fields

All file documents have the following fields present.

Required Fields

Required fields are common to all search documents in your Dovetail Seeker search index.

Summary and Contents

The Summary and Content fields are populated with the text extracted from file being indexed. The length of this text copied to the summary field can be controlled via configuration.

Title

The title field is populated from the extracted file's metadata. When no title is found in the metadata the file name of the file is used.

File Detail Fields

All file documents have the following fields which allow search users to search for file documents by their file specific characteristics.

Path

All file documents have a path field whose value is the full filesystem path to the file which was indexed. Example: \server\share\filename.pdf

This value is used by the Dovetail Seeker Web Service to serve the file when requested to do so.

File Name

All file documents have a filename field whose value is the filename of the file which was indexed. Example: filename.pdf

Extension

All file documents have an extension field whose value is the extension of the file which was indexed. Example: pdf

Content Type

All file documents have a contentType field whose value is the MIME type of the file which was indexed. Example: application/pdf

Content Length

All file documents have a contentLength field whose value is the number of bytes representing the size of the file on disk.