ATG Search represents each document as a set of properties and their values. Each ATG Search document is uniquely identified by a URL (typically the path name of the file on the file system). Properties can either be meta
properties, which are used for constraints and are not full-text indexed, or text
properties, which are full-text indexed for searching. When constructing a query, a client can constrain the search by meta
property, and also specify a list of properties to be returned for each search result item.
In the XHTML documents that the ATG platform generates from repository items, meta properties are represented by meta
tags in the head of the document, while text properties are represented by div
tags in the body of the document. The ATG platform generates meta
and div
tags using values from repository item properties, and uses a URL of the following form to uniquely identify each document:
atgrep:/repository-name
/item-descriptor-name
/repository-id
meta
and div
properties are output with the following formats:
<meta name="atg:type
:property-name
" content="property-v
alue
">
<div class="atg:role:property-name
" id="ID
">
The XHTML documents name the properties using a simplified bean property notation. For example, a document generated from a user profile might have firstName
and lastName
properties corresponding to the equivalent properties of the user
repository item type. The document properties corresponding to the address1
and address2
properties of the homeAddress
child repository item would be homeAddress.address1
and homeAddress.address2
.
Multi-value properties are given names without array subscripts, as are the property names of multi-value repository item properties. For example, suppose a user repository item can have multiple homeAddress
child items. In the ATG platform, the state
properties of these items would be named homeAddress[0].state
and homeAddress[1].state
. In the XHTML documents, however, both properties would be named homeAddress.state
.
In addition to the properties you specify in the definition file, the output document also includes certain properties that provide sufficient information to identify the repository items represented in the document. The output for each item automatically includes the properties $repositoryId
, $repository.repositoryName
, and $itemDescriptor.itemDescriptorName
. The output for the document-level item also includes a $url
property and a $baseUrl
property, which each contain the URL representing this repository item. (The difference between these properties is that if a VariantProducer
is used to generate multiple documents from the same repository item, the $url
property for each document will include unique query arguments to distinguish the document from the others. The $baseUrl
property, which omits the query arguments, will be the same for each document. See Using Variant Producers for more information.)
The following XHTML document, which shows sample output from the definition file appearing in the Definition File Format section, illustrates each of these constructs:
<html> <head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> <title>Madeira</title> <meta name="atg:date:dateOfBirth" content="-1583175600000"/> <meta name="atg:string:$repository.repositoryName" content="UserProfiles"/> <meta name="atg:string:$repositoryId" content="743"/> <meta name="atg:string:$itemDescriptor.itemDescriptorName" content="user"/> <meta name="atg:string:$url" content="atgrep:/UserProfiles/user/743"/> <meta name="atg:string:$baseUrl" content="atgrep:/UserProfiles/user/743"/> <meta name="atg:string:homeAddress.$repository.repositoryName" content="UserProfiles"/> <meta name="atg:string:homeAddress.$repositoryId" content="743"/> <meta name="atg:string:homeAddress.$itemDescriptor.itemDescriptorName" content="contactInfo"/> </head> <body> <div class="atg:role:firstName" id="0"> Franklin </div> <div class="atg:role:lastName" id="1"> Madeira </div> <div class="atg:role:homeAddress.address1" id="2"> 802 Replicant Blvd. </div> <div class="atg:role:homeAddress.city" id="3"> Los Angeles </div> <div class="atg:role:homeAddress.state" id="4"> CA </div> <div class="atg:role:homeAddress.postalCode" id="5"> 98506 </div> <div class="atg:role:homeAddress.phoneNumber" id="6"> (212)555-1234 </div> </body> </html>