Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This is done in an external xml configuration file (DocumentConfig.xml) which is loaded into a corresponding POJO name DocumentConfig. The configuration file is loaded at the time of startup of application and retained in memory until the application is shutdown. So any changes to this file will become effective only after restarting the application. There are limitations on what can be configured in this file. Changes to this file will need the existing documents to be re-indexed.

4.1 DocumentConfig

DocumentConfig.xml

It is available in %ole.docstore.home%/properties folder. (e.g. /opt/docstore/properties)

4.2 Field Definition

Field name convention:

Names of fields used for indexing/searching are suffixed with "_search".

...

Field Attribute

Purpose

Example

Id

Unique identifier of a field with a given [category, type, format]

id="ISBN_search"

Name

Name of the field suitable for display

name="ISBN"

Type

Indicates the type of value of the field (informative purpose only)

type="text"

Field Definition Example:

No Format
       A Field inside configurations file can be defined with attribute id is the name of the field inside solr by which it can be represented or indexed,

 name is the one to be displayable name of the filed and type is its entity type.

       <field id="ISBN_search" name="ISBN" type="text">

          <mapping type="custom">

               <include>020-a;z</include>

               <exclude/>                       

          </mapping>

     </field>

Mapping info can be defined for each field which specifies how the value(s) for the field should be extracted from the input file for the corresponding document. Mapping can be specified as XPATH value or a custom value.

Mapping Info/Attributes

Mapping Attribute

Purpose

Example

Type

Indicates how the mapping info is to be interpreted

type="custom"

Include

Values to be included

<include>020-a;z</include>

Exclude

Values to be excluded

<exclude/>

Mapping Entry:

No Format

Mapping is either of the types 'custom'/'xpath'. All the fields or defined values to include or exclude to  derive actual field values of xml.
Custom is the type where its  definitions are customized and understood by only that type of doc  builder.
XPath is the one defined to be of derived xpath of the elements in conjunctions with its types of concerned java, what tags or fields to be
included or excluded.
<field id="ISBN_search" name="ISBN" type="text">
          <mapping type="custom">
              <include>020-a;z</include>
              <exclude/>                       
          </mapping>
     </field>

4.3 Mapping Definition

Mapping info can be defined for each field which specifies how the value(s) for the field should be extracted from the input file for the corresponding document. Mapping can be specified as XPATH value or a custom value.

Mapping Info/Attributes

Mapping Attribute

Purpose

Example

Type

Indicates how the mapping info is to be interpreted

type="custom"

Include

Values to be included

<include>020-a;z</include>

Exclude

Values to be excluded

<exclude/>

xpath Mapping Example:

No Format
       <field id="ContractNumber_search" name="Contract Number" type="text">

          <mapping type="xpath">

              <include>/publicationsLicenseExpression/licenseDetail/licenseIdentifier/IDValue/value</include>                       

          </mapping>
        </field>

Above is the example for the field of mapping type xpath.

4.4 Modifying configuration info

...

  1. Open the DocumentConfig.xml file.
  2. Add/modify/delete one or more fields of any [document category/type/format].
  3. Save the file.
  4. Reload the DocStore application. (Restart the Tomcat server.)
  5. Re-index the data related to the document category/type/format modified.

...