Difference between revisions of "Creating Indices at the VO Level"

From Gcube Wiki
Jump to: navigation, search
m
(FtsRowset_Transformer)
 
(27 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:gCube Administrator's Guide]]
+
[[Category:Administrator's Guide]]
 
==Indexing Procedure==
 
==Indexing Procedure==
  
Line 8: Line 8:
 
* Definition of an [[ IR Bootstrapper | IRBootstrapper]] job that will perform the steps required to create the Indices.
 
* Definition of an [[ IR Bootstrapper | IRBootstrapper]] job that will perform the steps required to create the Indices.
  
In the first two steps we create generic resources for the Rowset XSLTs and Index Types through the [[ Resource Management | Resource Management portlet ]]. You can find detailed descriptions for the Rowset data (the output of the Rowset XSLT transformation) in the following sections:
+
In the first two steps we create generic resources for the Rowset XSLTs and Index Types through the [[ Resource Management | Resource Management portlet ]]. You can find detailed descriptions for the Rowset data (the output of the Rowset XSLT transformation) in the following section:
  
 
* [[ Index_Management_Framework#RowSet| Full Text Index Rowset ]]
 
* [[ Index_Management_Framework#RowSet| Full Text Index Rowset ]]
* [[ Index_Management_Framework#RowSet_2 | Geo-Spatial Index Rowset ]]
 
* [[ Index_Management_Framework#RowSet_3 | Forward Index Rowset ]]
 
  
 
You can find detailed descriptions for the Index Type definition here:
 
You can find detailed descriptions for the Index Type definition here:
  
 
* [[ Index_Management_Framework#IndexType | Full Text Index Type ]]
 
* [[ Index_Management_Framework#IndexType | Full Text Index Type ]]
* [[ Index_Management_Framework#GeoIndexType | Geo-Spatial Index Type ]]
 
* [[ Index_Management_Framework#Forward_Index | Forward Index key-value pairs ]]
 
  
For the third step, a definition of an IRBootstrapper job is required. You can find the details for defining such a job in the [[ IR Bootstrapper ]] section. To complete the Index creation, the administrator must go to the IRBootstrapper and run the job. The two examples that follow will clarify the three steps.  
+
For the third step, a definition of an IRBootstrapper job is required. You can find the details for defining such a job in the [[ IR Bootstrapper ]] section. To complete the Index creation, the administrator must go to the IRBootstrapper and run the job. The two examples that follow will clarify the three steps.
  
==Creating a Full Text and a Forward Index for a collection with two views==
+
==Creating an Index for an OAI-DC collection==
  
In this example we will create a Full Text and a Forward Index for a collection that has one view for the data in ES schema and one view for the data in DC schema. First of all let's create a generic resource for the Full Text Rowset XSLT for the collection data in ES schema:
+
=== DataTransformation Programs ===
  
Name := BrokerXSLT_es_anylanguage_to_ftRowset_anylanguage
+
====FtsRowset_Transformer====
 +
The following transformation program is called for fulltext rowset creation. Transformation unit with id="6" takes multiple XSLTs and applies final XSLT at the end.
  
SecondaryType := MetadataBrokerXSLT
+
[[File:FtsRowset_Transformer.xml]]
  
Description := XSLT to transform from es schema to full text index rowset schema
+
=== Index Types ===
 +
In this section we present the required IndexType for (FullText) Index.
  
Body :=
+
====FullTextIndexType====
<source lang="xml">
+
In order to extract the fields from the OAI-DC payload and build the FullText Index the following FullTextIndexType is required:
           
+
        <xsl:stylesheet xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
               
+
            <xsl:output xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" indent="yes" method="xml" omit-xml-declaration="yes" />
+
               
+
            <xsl:template xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="/">
+
                   
+
              <ROWSET xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                       
+
                  <xsl:apply-templates xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//esObject" />
+
                   
+
              </ROWSET>
+
               
+
            </xsl:template>
+
               
+
            <xsl:template xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="//esObject">
+
                   
+
              <ROW xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                       
+
                  <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="title">
+
                           
+
                    <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="title" />
+
                       
+
                  </FIELD>
+
                       
+
                  <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="description">
+
                           
+
                    <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="description" />
+
                       
+
                  </FIELD>
+
                       
+
                  <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="purpose">
+
                           
+
                    <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="purpose" />
+
                       
+
                  </FIELD>
+
                       
+
                  <xsl:for-each xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="provenance/creator">
+
                           
+
                    <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="creator">
+
                               
+
                        <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." />
+
                           
+
                    </FIELD>
+
                       
+
                  </xsl:for-each>
+
                       
+
                  <xsl:for-each xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="descKeys/keyword">
+
                           
+
                    <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="keyword">
+
                               
+
                        <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="." />
+
                           
+
                    </FIELD>
+
                       
+
                  </xsl:for-each>
+
                       
+
                  <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="date">
+
                           
+
                    <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="timeFrame/end" />
+
                       
+
                  </FIELD>
+
                       
+
                  <FIELD xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="suppInfo">
+
                           
+
                    <xsl:value-of xmlns:dc="http://dublincore.org/documents/dcmi-terms/" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="suppInfo" />
+
                       
+
                  </FIELD>
+
                   
+
              </ROW>
+
               
+
            </xsl:template>
+
           
+
        </xsl:stylesheet>
+
</source>
+
 
+
Note that this XSLT extracts a number of fields from the collection payload.
+
In the same fashion we create the Full Text Rowset XSLT for the DC schema:
+
 
+
Name := BrokerXSLT_dc_anylanguage_to_ftRowset_anylanguage
+
 
+
SecondaryType := MetadataBrokerXSLT
+
 
+
Description := XSLT to transform from DC schema to FTS rowset schema (suitable for feeding the full text index).
+
  
Body :=
 
 
<source lang="xml">
 
<source lang="xml">
  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
<Name>IndexType_ft_oai_dc_1.0</Name>
               
+
<SecondaryType>FullTextIndexType</SecondaryType>
            <xsl:output xmlns:xsl="http://www.w3.org/1999/XSL/Transform" indent="yes" method="xml" omit-xml-declaration="yes" />
+
<Description>Definition of the fulltext index type for the 'oai dc' schema</Description>
               
+
<Body>
            <xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="/">
+
    <index-type name="default">
                   
+
        <field-list sort-xnear-stop-word-threshold="2E8">
              <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
              <field name="contributor">
                       
+
                    <index>yes</index>
                  <ROW xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                    <store>yes</store>
                           
+
                    <return>yes</return>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="description.abstract">
+
                    <tokenize>yes</tokenize>
                               
+
                    <sort>no</sort>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='description.abstract']" />
+
                    <boost>1.0</boost>
                           
+
              </field>
                     </FIELD>
+
              <field name="coverage">
                           
+
                    <index>yes</index>
                     <xsl:for-each xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='subject']">
+
                    <store>yes</store>
                               
+
                    <return>yes</return>
                        <xsl:if xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="normalize-space(.)">
+
                    <tokenize>yes</tokenize>
                                   
+
                    <sort>no</sort>
                          <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="subject">
+
                    <boost>1.0</boost>
                                       
+
              </field>
                              <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="normalize-space(.)" />
+
              <field name="creator">
                                   
+
                    <index>yes</index>
                          </FIELD>
+
                    <store>yes</store>
                               
+
                    <return>yes</return>
                        </xsl:if>
+
                    <tokenize>yes</tokenize>
                           
+
                     <sort>no</sort>
                     </xsl:for-each>
+
                    <boost>1.0</boost>
                           
+
              </field>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="type">
+
              <field name="date">
                               
+
                    <index>yes</index>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='type']" />
+
                    <store>yes</store>
                           
+
                    <return>yes</return>
                     </FIELD>
+
                    <tokenize>yes</tokenize>
                           
+
                    <sort>no</sort>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="identifier">
+
                    <boost>1.0</boost>
                               
+
              </field>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='identifier']" />
+
              <field name="description">
                           
+
                    <index>yes</index>
                     </FIELD>
+
                    <store>yes</store>
                           
+
                     <return>yes</return>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="language">
+
                    <tokenize>yes</tokenize>
                               
+
                     <sort>no</sort>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='language']" />
+
                    <boost>1.0</boost>
                           
+
              </field>
                     </FIELD>
+
              <field name="format">
                           
+
                    <index>yes</index>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="publisher">
+
                    <store>yes</store>
                               
+
                    <return>yes</return>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='publisher']" />
+
                    <tokenize>yes</tokenize>
                           
+
                    <sort>no</sort>
                     </FIELD>
+
                    <boost>1.0</boost>
                           
+
              </field>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="contributor">
+
              <field name="identifier">
                               
+
                    <index>yes</index>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='contributor']" />
+
                    <store>yes</store>
                           
+
                    <return>yes</return>
                     </FIELD>
+
                     <tokenize>yes</tokenize>
                           
+
                     <sort>no</sort>
                     <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="source">
+
                    <boost>1.0</boost>
                               
+
              </field>
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//*[local-name()='source']" />
+
              <field name="language">
                           
+
                    <index>yes</index>
                     </FIELD>
+
                    <store>yes</store>
                       
+
                    <return>yes</return>
                  </ROW>
+
                    <tokenize>yes</tokenize>
                   
+
                    <sort>no</sort>
              </ROWSET>
+
                    <boost>1.0</boost>
               
+
              </field>
            </xsl:template>
+
              <field name="publisher">
           
+
                    <index>yes</index>
        </xsl:stylesheet>
+
                    <store>yes</store>
   
+
                     <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                     <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="relation">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                    <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                    <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="rights">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                     <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                     <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="source">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                    <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                    <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="subject">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                     <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                     <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="title">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                    <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                    <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="type">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                     <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                     <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="ObjectID">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                    <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                    <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="gDocCollectionID">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                     <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                     <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="gDocCollectionLang">
 +
                    <index>yes</index>
 +
                    <store>yes</store>
 +
                    <return>yes</return>
 +
                    <tokenize>yes</tokenize>
 +
                    <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
              <field name="S">
 +
                    <index>no</index>
 +
                    <store>yes</store>
 +
                     <return>yes</return>
 +
                    <tokenize>no</tokenize>
 +
                    <sort>no</sort>
 +
                    <boost>1.0</boost>
 +
              </field>
 +
        </field-list>
 +
    </index-type>
 +
</Body>
 
</source>
 
</source>
  
Additionally we must create the corresponding Full Text Index Type for the fields extracted from the ES and DC payload:
 
  
 +
=== Bootstrapper Configuration ===
 +
The IRBootstrapper portlet requires a Generic Resource to be available on the IS with name: '''IRBootstrapperConfiguration''' and secondary type: '''IRBootstrapperConfig'''.
 +
For more information please refer to this section [https://gcube.wiki.gcube-system.org/gcube/index.php/IR_Bootstrapper#Bootstrapper_Static_Configuration IRBoostrapperConfiguration Generic Resource]
  
Name := IndexType_ft_es_dc_2.0
+
An example of the configuration is the following:
  
SecondaryType := FullTextIndexType
+
[[File:Bootstrapper_Configuration.xml]]
  
Description := Definition of the fulltext index type for the 'es' + 'dc' schema
+
=== Metadata Broker XSLT ===
  
Body :=
+
*BrokerXSLT_oai_dc_anylanguage_to_ftRowset_anylanguage
 +
The following XSLT transforms data elements with oai-dc schema to fulltext rowsets:
  
<source lang="xml">
+
[[File:BrokerXSLT_oai_dc_anylanguage_to_ftRowset_anylanguage.xml]]
 
+
        <index-type name="default">
+
               
+
            <field-list sort-xnear-stop-word-threshold="2E8">
+
                   
+
              <field name="title">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="description">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="purpose">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="creator">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="keyword">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="date">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="suppInfo">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="description.abstract">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="subject">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="type">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="identifier">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="language">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="publisher">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="contributor">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="source">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="gDocCollectionID">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
                   
+
              <field name="gDocCollectionLang">
+
                       
+
                  <index>yes</index>
+
                       
+
                  <store>yes</store>
+
                       
+
                  <return>yes</return>
+
                       
+
                  <tokenize>yes</tokenize>
+
                       
+
                  <sort>no</sort>
+
                       
+
                  <boost>1.0</boost>
+
                   
+
              </field>
+
               
+
            </field-list>
+
           
+
        </index-type>
+
     
+
</source>
+
 
+
Note, in the Index Type above, that we also need to define the default "gDocCollectionID" and "gDocCollectionLang" fields, although there are not referenced in the XSLTs(the are automatically added by the [[ Data_Transformation | DTS ]] ).
+
Then we will create the generic resources for the Forward Index. We will present a simple case here and we will use only the ES payload to create the Forward Rowsets. The following Rowset XSLT extracts the "title" and "creator" fields from the ES payload:
+
 
+
 
+
Name := BrokerXSLT_es_anylanguage_to_fwRowset_anylanguage_title_creator
+
 
+
SecondaryType := MetadataBrokerXSLT
+
 
+
Description := XSLT to transform from es schema to forward rowset schema including the 'title' and 'creator' fields (suitable for feeding the forward index).
+
 
+
Body :=
+
<source lang="xml">
+
 
+
      <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
               
+
            <xsl:output xmlns:xsl="http://www.w3.org/1999/XSL/Transform" indent="yes" method="xml" omit-xml-declaration="yes" />
+
               
+
            <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="keys">
+
                   
+
              <key xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                       
+
                  <keyName xmlns:xsl="http://www.w3.org/1999/XSL/Transform">title</keyName>
+
                       
+
                  <keyXPath xmlns:xsl="http://www.w3.org/1999/XSL/Transform">//title</keyXPath>
+
                   
+
              </key>
+
                   
+
              <key xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                       
+
                  <keyName xmlns:xsl="http://www.w3.org/1999/XSL/Transform">creator</keyName>
+
                       
+
                  <keyXPath xmlns:xsl="http://www.w3.org/1999/XSL/Transform">//creator</keyXPath>
+
                   
+
              </key>
+
               
+
            </xsl:variable>
+
               
+
            <xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="/">
+
                   
+
              <xsl:element xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="ROWSET">
+
                       
+
                  <xsl:element xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="INSERT">
+
                           
+
                    <xsl:element xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="TUPLE">
+
                               
+
                        <xsl:element xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="VALUE">
+
                                   
+
                          <xsl:for-each xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//title">
+
                                       
+
                              <xsl:if xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="normalize-space(.)">
+
                                           
+
                                <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="title">
+
                                               
+
                                    <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="normalize-space(.)" />
+
                                           
+
                                </FIELD>
+
                                       
+
                              </xsl:if>
+
                                   
+
                          </xsl:for-each>
+
                                   
+
                          <xsl:for-each xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//creator">
+
                                       
+
                              <xsl:if xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="normalize-space(.)">
+
                                           
+
                                <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="creator">
+
                                               
+
                                    <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="normalize-space(.)" />
+
                                           
+
                                </FIELD>
+
                                       
+
                              </xsl:if>
+
                                   
+
                          </xsl:for-each>
+
                               
+
                        </xsl:element>
+
                           
+
                    </xsl:element>
+
                       
+
                  </xsl:element>
+
                   
+
              </xsl:element>
+
               
+
            </xsl:template>
+
           
+
        </xsl:stylesheet>
+
     
+
</source>
+
 
+
In this example "title" and "creator" will have string values, so we just need to create a generic resource for string-string key-value pairs:
+
 
+
Name := IndexType_fwd_string_string
+
 
+
SecondaryType := ForwardIndexType
+
 
+
Description := Definition of the index type 'string_string' for the forward index
+
 
+
Body :=
+
<source lang="xml">
+
 
+
        <field-list>
+
               
+
            <field name="key">
+
     
+
              <type>string</type>
+
     
+
              <sort>ascending</sort>
+
   
+
            </field>
+
   
+
            <field name="value">
+
     
+
              <type>string</type>
+
   
+
            </field>
+
   
+
        </field-list>
+
 
+
</source>
+
 
+
In case we had a field that would have a single date value in the format 'yyyy-MM-dd' for each document, we would also have to create a generic resource for a string-date key-value pair like the following one:
+
 
+
Name := IndexType_fwd_esDate_string
+
 
+
SecondaryType := ForwardIndexType
+
 
+
Description := Definition of the index type 'date_string' for the forward index (suitable for es schema indexing)
+
 
+
Body :=
+
<source lang="xml">
+
 
+
        <field-list>
+
               
+
            <field name="key">
+
     
+
              <type>date</type>
+
     
+
              <format>yyyy-MM-dd</format>
+
     
+
              <sort>ascending</sort>
+
   
+
            </field>
+
   
+
            <field name="value">
+
     
+
              <type>string</type>
+
   
+
            </field>
+
   
+
        </field-list>
+
 
+
</source>
+
 
+
Finally we would have to append to the IRBootStrapper configuration generic resource the following job that would create the Full Text and Forward Index:
+
 
+
<source lang="xml">
+
 
+
<job jobtype="IndexCollection" name="IndexEsDcCollection">
+
                       
+
                  <initialization>
+
                           
+
                    <assign to="%IndexCollection.input.ColName" value="European Environment Agency: Topic Reports" />
+
                           
+
                    <assign to="%Create_MC_ft_index.FullTextIndexGenerationTask.IndexTypeID" value="ft_es_dc_2.0" />
+
                           
+
                    <assign to="%Create_MC_ft_index.FullTextIndexGenerationTask.TransformationXSLTID" value="$BrokerXSLT_wrapperFT" />
+
                           
+
                    <assign to="%Create_MC_ft_index.FullTextIndexGenerationTask.Views" value="[ 5ec68209-41f1-4c1c-9359-ff055a38d981, 55404922-12ee-4808-9cc7-ac1ab38c4a2e ]" />
+
                           
+
                    <assign to="%Create_MC_ft_index.FullTextIndexGenerationTask.ViewsXSLTSIDs" value="[ $BrokerXSLT_es_anylanguage_to_ftRowset_anylanguage, $BrokerXSLT_dc_anylanguage_to_ftRowset_anylanguage ]" />
+
                           
+
                    <assign to="%Create_MC_ft_index.FullTextIndexGenerationTask.IdOfIndexManagerToAppend" userInputLabel="ID of FT index management resource to append" value="%userInput" />
+
                           
+
                    <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.TransformationXSLTID" value="$BrokerXSLT_wrapperFWD" />
+
                           
+
                    <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.IndexedKeyNames" value="[ ObjectID, gDocCollectionID, gDocCollectionLang, title, creator ]" />
+
                           
+
                    <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.IndexedKeyTypes" value="[ fwd_string_string, fwd_string_string, fwd_string_string, fwd_string_string, fwd_string_string ]" />
+
                           
+
                    <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.Views" value="[ 5ec68209-41f1-4c1c-9359-ff055a38d981 ]" />
+
                           
+
                    <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.ViewsXSLTSIDs" value="[ $BrokerXSLT_es_anylanguage_to_fwRowset_anylanguage_title_creator ]" />
+
                           
+
                    <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.IdOfIndexManagerToAppend" userInputLabel="ID of FWD index management resource to append" value="%userInput" />
+
                       
+
                  </initialization>
+
                   
+
</job>
+
 
+
 
+
</source>
+
 
+
where the jobtype is defined in the corresponding section of the IRBootstrapper configuration:
+
 
+
<source lang="xml">
+
 
+
<jobtype description="Creates the required FT-FWD indices for a collection." name="IndexCollection">
+
                       
+
                  <input type="GCUBECollection" />
+
                       
+
                  <jobDefinition>
+
                           
+
                    <sequential>
+
                               
+
                        <sequential>
+
                                   
+
                          <assign to="%Create_MC_ft_index.input" value="%IndexCollection.input" />
+
                                   
+
                          <assign to="%Create_MC_ft_index.output.IndexedCollectionID" value="%Create_MC_ft_index.input.ColID" />
+
                                   
+
                          <assign to="%Create_MC_ft_index.FullTextIndexGenerationTask.NumberOfLookups" value="2" />
+
                                   
+
                          <task name="Create_MC_ft_index" tasktype="FullTextIndexGenerationTask" />
+
                               
+
                        </sequential>
+
                               
+
                        <sequential>
+
                                   
+
                          <assign to="%Create_MC_fwd_index.input" value="%IndexCollection.input" />
+
                                   
+
                          <assign to="%Create_MC_fwd_index.output.IndexedCollectionID" value="%Create_MC_fwd_index.input.ColID" />
+
                                   
+
                          <assign to="%Create_MC_fwd_index.ForwardIndexGenerationTask.NumberOfLookups" value="2" />
+
                                   
+
                          <task name="Create_MC_fwd_index" tasktype="ForwardIndexGenerationTask" />
+
                               
+
                        </sequential>
+
                           
+
                    </sequential>
+
                       
+
                  </jobDefinition>
+
                   
+
</jobtype>
+
 
+
</source>
+
 
+
Note in the IRBootstrapper job, that for the Forward Index we additionally define the default fields ObjectID, gDocCollectionID and gDocCollectionLang which are all of string-string type.
+
 
+
==Creating a Geo-Spatial Index for a collection with ES payload==
+
 
+
Just as before we need to create the generic resource for the Geo Rowset XSLT:
+
 
+
Name := BrokerXSLT_es_anylanguage_to_geoRowset_anylanguage
+
 
+
SecondaryType := MetadataBrokerXSLT
+
 
+
Description := XSLT to transform from ES schema to geo index rowset schema
+
 
+
Body :=
+
<source lang="xml">
+
           
+
        <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
   
+
            <xsl:output xmlns:xsl="http://www.w3.org/1999/XSL/Transform" indent="yes" method="xml" />
+
   
+
            <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="zeroDate" select="'00000000T000000Z'" />
+
   
+
            <xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="/">
+
     
+
              <ROWSET xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                       
+
                  <xsl:apply-templates xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="//esObject" />
+
     
+
              </ROWSET>
+
   
+
            </xsl:template>
+
   
+
            <xsl:template xmlns:xsl="http://www.w3.org/1999/XSL/Transform" match="//esObject">
+
     
+
              <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="flag">
+
     
+
                  <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                           
+
                    <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="location/westBL[.!='']">
+
       
+
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="'true'" />
+
       
+
                    </xsl:when>
+
       
+
                    <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                               
+
                        <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="'false'" />
+
       
+
                    </xsl:otherwise>
+
     
+
                  </xsl:choose>
+
     
+
              </xsl:variable>
+
     
+
              <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="id" select="generate-id()" />
+
     
+
              <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="dateTimeStringBegin" select="timeFrame/begin" />
+
     
+
              <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="dateTimeStringEnd" select="timeFrame/end" />
+
     
+
              <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="beginDateEmpty" select="($dateTimeStringBegin=$zeroDate) or ($dateTimeStringBegin='unavailable') or (not(normalize-space($dateTimeStringBegin)))" />
+
     
+
              <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="endDateEmpty" select="($dateTimeStringEnd=$zeroDate) or ($dateTimeStringEnd='unavailable') or (not(normalize-space($dateTimeStringEnd)))" />
+
     
+
              <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                       
+
                  <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="$flag='true'">
+
       
+
                    <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="startField">
+
       
+
                        <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                   
+
                          <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="$beginDateEmpty='true'">
+
         
+
                              <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                           
+
                                <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="$endDateEmpty='true'">
+
           
+
                                    <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$zeroDate" />
+
           
+
                                </xsl:when>
+
           
+
                                <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                               
+
                                    <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="concat(substring($dateTimeStringEnd,1,4), '-', substring($dateTimeStringEnd,5,2), '-', substring($dateTimeStringEnd,7,2))" />
+
           
+
                                </xsl:otherwise>
+
         
+
                              </xsl:choose>
+
         
+
                          </xsl:when>
+
         
+
                          <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                       
+
                              <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="concat(substring($dateTimeStringBegin,1,4), '-', substring($dateTimeStringBegin,5,2), '-', substring($dateTimeStringBegin,7,2))" />
+
         
+
                          </xsl:otherwise>
+
       
+
                        </xsl:choose>
+
       
+
                    </xsl:variable>
+
       
+
                    <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="endField">
+
       
+
                        <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                   
+
                          <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="$endDateEmpty='true'">
+
         
+
                              <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                           
+
                                <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="$beginDateEmpty='true'">
+
           
+
                                    <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$zeroDate" />
+
           
+
                                </xsl:when>
+
           
+
                                <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                               
+
                                    <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="concat(substring($dateTimeStringBegin,1,4), '-', substring($dateTimeStringBegin,5,2), '-', substring($dateTimeStringBegin,7,2))" />
+
           
+
                                </xsl:otherwise>
+
         
+
                              </xsl:choose>
+
         
+
                          </xsl:when>
+
         
+
                          <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                       
+
                              <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="concat(substring($dateTimeStringEnd,1,4), '-', substring($dateTimeStringEnd,5,2), '-', substring($dateTimeStringEnd,7,2))" />
+
         
+
                          </xsl:otherwise>
+
       
+
                        </xsl:choose>
+
       
+
                    </xsl:variable>
+
       
+
                    <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                               
+
                        <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="location/southBL[.!='']">
+
         
+
                          <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="x1" select="location/westBL" />
+
         
+
                          <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="y1" select="location/southBL" />
+
         
+
                          <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="x2" select="location/eastBL" />
+
         
+
                          <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="y2" select="location/northBL" />
+
         
+
                          <ROW xmlns:xsl="http://www.w3.org/1999/XSL/Transform" id="{$id}" x1="{$x1}" x2="{$x2}" y1="{$y1}" y2="{$y2}">
+
         
+
                              <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="StartTime">
+
           
+
                                <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$startField" />
+
         
+
                              </FIELD>
+
         
+
                              <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="EndTime">
+
           
+
                                <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$endField" />
+
         
+
                              </FIELD>
+
         
+
                          </ROW>
+
       
+
                        </xsl:when>
+
       
+
                        <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                   
+
                          <ROW xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />
+
       
+
                        </xsl:otherwise>
+
       
+
                    </xsl:choose>
+
     
+
                  </xsl:when>
+
     
+
                  <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                           
+
                    <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                               
+
                        <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="location/centerLat[.!=''] and location/centerLon[.!='']">
+
         
+
                          <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="cLat" select="location/centerLat" />
+
         
+
                          <xsl:variable xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="cLon" select="location/centerLon" />
+
         
+
                          <ROW xmlns:xsl="http://www.w3.org/1999/XSL/Transform" id="{$id}" x1="{$cLon}" y1="{$cLat}">
+
         
+
                              <FIELD xmlns:xsl="http://www.w3.org/1999/XSL/Transform" name="TimeStamp">
+
           
+
                                <xsl:choose xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                               
+
                                    <xsl:when xmlns:xsl="http://www.w3.org/1999/XSL/Transform" test="$endDateEmpty='true'">
+
             
+
                                      <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$zeroDate" />
+
           
+
                                    </xsl:when>
+
           
+
                                    <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                                   
+
                                      <xsl:value-of xmlns:xsl="http://www.w3.org/1999/XSL/Transform" select="$dateTimeStringEnd" />
+
           
+
                                    </xsl:otherwise>
+
           
+
                                </xsl:choose>
+
         
+
                              </FIELD>
+
         
+
                          </ROW>
+
       
+
                        </xsl:when>
+
       
+
                        <xsl:otherwise xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
                                   
+
                          <ROW xmlns:xsl="http://www.w3.org/1999/XSL/Transform" />
+
       
+
                        </xsl:otherwise>
+
       
+
                    </xsl:choose>
+
     
+
                  </xsl:otherwise>
+
     
+
              </xsl:choose>
+
   
+
            </xsl:template>
+
   
+
        </xsl:stylesheet>
+
 
+
      </Body>
+
 
+
  </Profile>
+
+
</Resource>
+
 
+
</source>
+
 
+
Then we create the generic resource for the Geo Index Type:
+
 
+
Name := IndexType_geo_span_1.0
+
 
+
SecondaryType := GeoIndexType
+
 
+
Description := Definition of the geo span index type
+
 
+
Body :=
+
<source lang="xml">
+
           
+
        <index-profile name="default2-geo">
+
               
+
            <field-list>
+
                   
+
              <field name="StartTime">
+
                       
+
                  <type>date</type>
+
                       
+
                  <return>yes</return>
+
                   
+
              </field>
+
                   
+
              <field name="EndTime">
+
                       
+
                  <type>date</type>
+
                       
+
                  <return>yes</return>
+
                   
+
              </field>
+
                   
+
              <field name="TimeStamp">
+
                       
+
                  <type>date</type>
+
                       
+
                  <return>yes</return>
+
                   
+
              </field>
+
               
+
            </field-list>
+
           
+
        </index-profile>
+
       
+
</source>
+
 
+
And finally we append the following job(and the jobtype in the corresponding section if it is not already there) in the IRBootstrapper configuration generic resource:
+
 
+
<source lang="xml">
+
 
+
<job jobtype="GeoIndexMetadataCollection" name="IndexGeoCollection">
+
                       
+
                  <initialization>
+
                           
+
                    <assign to="%GeoIndexMetadataCollection.input.SchemaName" value="es" />
+
                           
+
                    <assign to="%GeoIndexMetadataCollection.input.SchemaURI" value="http://es.xsd" />
+
                           
+
                    <assign to="%Create_MC_geo_index.GeoIndexGenerationTask.IndexTypeID" value="geo_span_1.0" />
+
                           
+
                    <assign to="%Create_MC_geo_index.GeoIndexGenerationTask.EsToGeoXSLTID" value="$BrokerXSLT_es_anylanguage_to_geoRowset_anylanguage" />
+
                           
+
                    <assign to="%Create_MC_geo_index.GeoIndexGenerationTask.IdOfIndexManagerToAppend" userInputLabel="ID of index management resource to append" value="%userInput" />
+
                       
+
                  </initialization>
+
                   
+
</job>
+
 
+
<jobtype description="Creates a geo index for a metadata view." name="GeoIndexMetadataCollection">
+
                       
+
                  <input type="MetadataCollection" />
+
                       
+
                  <jobDefinition>
+
                           
+
                    <sequential>
+
                               
+
                        <sequential>
+
                                   
+
                          <assign to="%Create_MC_geo_index.input" value="%GeoIndexMetadataCollection.input" />
+
                                   
+
                          <assign to="%Create_MC_geo_index.output.IndexedCollectionID" value="%Create_MC_geo_index.input.ColID" />
+
                                   
+
                          <assign to="%Create_MC_geo_index.GeoIndexGenerationTask.NumberOfLookups" value="2" />
+
                                   
+
                          <task name="Create_MC_geo_index" tasktype="GeoIndexGenerationTask" />
+
                               
+
                        </sequential>
+
                           
+
                    </sequential>
+
                       
+
                  </jobDefinition>
+
                   
+
</jobtype>
+
 
+
 
+
 
+
</source>
+

Latest revision as of 18:04, 9 May 2014

Indexing Procedure

The Indexing procedure refers to the creation of indices for the collections imported in a Virtual Organization. It consists of three steps:

  • Creation of the Rowset XSLT generic resources, that transform collection data into data that can be fed to an Index.
  • Creation of the Index type generic resources, that define the Index configuration.
  • Definition of an IRBootstrapper job that will perform the steps required to create the Indices.

In the first two steps we create generic resources for the Rowset XSLTs and Index Types through the Resource Management portlet . You can find detailed descriptions for the Rowset data (the output of the Rowset XSLT transformation) in the following section:

You can find detailed descriptions for the Index Type definition here:

For the third step, a definition of an IRBootstrapper job is required. You can find the details for defining such a job in the IR Bootstrapper section. To complete the Index creation, the administrator must go to the IRBootstrapper and run the job. The two examples that follow will clarify the three steps.

Creating an Index for an OAI-DC collection

DataTransformation Programs

FtsRowset_Transformer

The following transformation program is called for fulltext rowset creation. Transformation unit with id="6" takes multiple XSLTs and applies final XSLT at the end.

File:FtsRowset Transformer.xml

Index Types

In this section we present the required IndexType for (FullText) Index.

FullTextIndexType

In order to extract the fields from the OAI-DC payload and build the FullText Index the following FullTextIndexType is required:

<Name>IndexType_ft_oai_dc_1.0</Name>
<SecondaryType>FullTextIndexType</SecondaryType>
<Description>Definition of the fulltext index type for the 'oai dc' schema</Description>
<Body>
    <index-type name="default">
        <field-list sort-xnear-stop-word-threshold="2E8">
              <field name="contributor">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="coverage">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="creator">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="date">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="description">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="format">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="identifier">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="language">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="publisher">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="relation">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="rights">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="source">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="subject">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="title">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="type">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="ObjectID">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="gDocCollectionID">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="gDocCollectionLang">
                     <index>yes</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>yes</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
              <field name="S">
                     <index>no</index>
                     <store>yes</store>
                     <return>yes</return>
                     <tokenize>no</tokenize>
                     <sort>no</sort>
                     <boost>1.0</boost>
              </field>
        </field-list>
    </index-type>
</Body>


Bootstrapper Configuration

The IRBootstrapper portlet requires a Generic Resource to be available on the IS with name: IRBootstrapperConfiguration and secondary type: IRBootstrapperConfig. For more information please refer to this section IRBoostrapperConfiguration Generic Resource

An example of the configuration is the following:

File:Bootstrapper Configuration.xml

Metadata Broker XSLT

  • BrokerXSLT_oai_dc_anylanguage_to_ftRowset_anylanguage

The following XSLT transforms data elements with oai-dc schema to fulltext rowsets:

File:BrokerXSLT oai dc anylanguage to ftRowset anylanguage.xml