Custom Fields

Custom fields are extra aspects of the entity you wish to be searchable. Custom field values are not returned with search results unless you request the search web service to do so.

<customField title="public">
 <path>public_ind</path>
</customField>

With this field in place, a search query can now filter out private solutions. Here is an example of a search for a solution using the public custom field:

>SeekerConsole.exe --search "domain:solution AND public:1"

The case specification shipped with Dovetail Seeker has a few more examples:

<customField title="part">
 <path>case_prt2part_info:part_info2part_num:part_number</path>
 <path>case_prt2part_info:part_info2part_num:description</path>
</customField>
<customField title="site">
 <path>case_reporter2site:name</path>
</customField>
<customField title="contact">
 <path>case_reporter2contact:first_name</path>
 <path>case_reporter2contact:last_name</path>
</customField>

These custom fields allow you to search for cases related to a particular part, reported by a site, or by a contact's name. Here is a more complex example that searches multiple fields:

>SeekerConsole.exe --search "(part:Seeker AND site:Dovetail) OR contact:Jones"

Note: When using a Clarify view as the basis of a document specification field paths cannot traverse relations.

Storing Field Values

By default custom field values are stored in the index making them available when requested in search results. If custom search result values are not needed it is possible to reduce the size of your search index by turning off for your custom fields.

<customField title="site" isStored="false">
 <path>case_reporter2site:name</path>
</customField>

In this example the isStored attribute of the customField element is set to false. Telling the indexer that these field values should not be copied into the search index.

Tokenizing Field Values

By default custom field values are tokenized to best allow the indexer to do its work. This is usually the desired behavior. However when sorting search results by custom fields it is required that the custom field should not be tokenized.

This can be accomplished by setting the optional isTokenized attribute on the customField element to false.

<customField title="contactSortOrder" isTokenized="false" isStored="false">
 <path>case_reporter2contact:last_name</path> <path>case_reporter2contact:first_name</path>
</customField>

In this example a custom field is being added to be used for sorting search results by a contact last and then first name. Notice that this field is not stored in the index as its only reason for existence is for search result sorting.

Description and Tags Field Values

Like document specifications custom field specifications can have description and tags attributes used to describe and categorization of the custom field. This information is relayed to the search client when document specifications are retrieved.

<customField title="created" description="Date the case was created." tags="rangeable,date">
  <path>creation_time</path>
</customField>

The Description could be used by a dynamic search client to communicate to the user what this custom field is intended to search for. The Tags field could be used to create a taxonomy of search fields. In the example above we are tagging the field as a date and informing the client that range queries would work well with this field.

See Also

Fields

Identification

Required Fields

Paths

Next

Paths

Custom Fields