Configuring schema for CloudView 5.1

Build 1501 on 14/Nov/2017  This topic last edited on: 26/Jun/2015, at 17:33

The first thing to do is specify which objects will be indexed. It can be done as following:

  <xs:element name="story">

    <xs:annotation>

      <xs:documentation>Complete story: text with subject(s) + list of video and 

      images. Descend from folderObject, so inherits slugline, author etc.</xs:documentation>

    </xs:annotation>

    <xs:complexType gs:key="folderRef name">

      <xs:annotation>

        <xs:appinfo>

          <gs:fullTextObj exaSourceName="story"/>

          ... 

This will index every “story” object will be created in Tark4/GN4 application, “exaSourceName” attribute refers to Exalead source name.

Second step is specifying which attributes of “story” object must be indexed:

         <xs:element name="richText" type="tHtml" gs:access="Content">

             <xs:annotation>

               <xs:appinfo>

                 <gs:fullTextAttr exaMetaName="richText"></gs:fullTextAttr>      

                 ...

          <xs:element name="richText" type="tHtml" gs:access="Content">

              <xs:annotation>

                <xs:appinfo>

                  <gs:fullTextAttr exaMetaName="richText"></gs:fullTextAttr>       

                  ...

In this case we’re indexing attribute “richText” and it will be put into correspondent Exalead meta data handler.  Also ancestor attributes can be indexed, for example it’s possible to index folderObject attributes like “creationDate” or “modifiedDate”.

Note: it’s not possible to index attributes starting with “_” or named “size” (conflicts with Exalead one); Meta data handler name must be changed.

Several options can be set for indexing attributes, defining a fullTextObj meta (optionally):

          <gs:fullTextObj exaSourceName="story">

            <gs:meta name="richText" score="TEXT" indexed="true" field="true" isHtml="true" />

          </gs:fullTextObj>

Name: The name of corresponding meta data handler in Exalead

Score: The Exalead score class name, in order to assign different score weight to attributes (Class score value can be changed in Exalead view administration)

Indexed: If the attribute’s content must be indexed as fulltext content (e.g.:  for identifier and date attributes can be set to false. This means that for example if we search “2009” it won’t find all the documents with a date containing “2009”)

Field: If attribute must be indexed in a specific Exalead field, so it can be searchable or used for sorting

IsHtml: If attribute’s content is HTML (or any XML code), if set true all tags inside content will be stripped

If a fullTextObj meta is not specified for an attribute, standard indexing options will be used for corresponding indexed attribute:

Name: TARK4/GN4 attribute name

Score: TEXT

Indexed: true

Field: true

IsHtml: false

For the CloudView 5.1 version there is new full-text attribute available in the schema to automatically introduce performance optimizations for index fields used for sorting.

Example:

<gs:meta 

 name="modifiedDate" 

 score="TEXT" 

 indexed="true" 

 field="true" 

 isHtml="false" 

 isUsedForSorting="true" />

Default value is false.

About 'shared' attributes and gs:meta name

This applies on the custom objects/elements (if any), in your GN4 schema.

On trying to rebuild the Exalead indexes (srv4 configureindex) after you upgraded the GN4 system that uses Exalead, you can get errors like:

Error configuring Exalead: Wrong configuration of Exalead field name "publicationDate", attribute "isField" mismatch for object type "img". (ERR0292)

The affected fields, in this example, were publicationDate, publicationRef, sourceRef on various elements: img, article, document, video, audio, story, genDoc, etc.

This simply means that in your custom objects/elements are missing certain definitions for the full-text search. As in the new GN4 version they were added to the standard schema to all the objects that share specific attributes (but NOT to your custom objects, that are not part of the standard schema!), you need to fix it in your custom schema and custom objects/elements.

In the previous example, the following lines were missing in the custom objects/elements Poll and webComment.

<gs:meta name="publicationDate" field="true" isUsedForSorting="true"/>

<gs:meta name="publicationRef" field="true" isUsedForSorting="true"/>

<gs:meta name="sourceRef" field="true" isUsedForSorting="true"/>

Adding them, and reloading the schema, the problem was solved.