Flint

All properties related to the index in Berlioz are gathered in the flint node. Below is a summary of all the properties.

Summary

NameDefaultDescription
flint.threads.number10The number of indexing threads
flint.threads.priority5The priority of the indexing threads
flint.watcher.watchtrueIf there should be a directory watcher
flint.watcher.root/psml/contentThe root folder for the directory watcher
flint.watcher.max-folders1000The maximum number of folders to watch, if there are more then folder watching is disabled.
flint.index.typesdefault

Comma separated list of index definitions

The following properties are relevant to a specific index type:

NameDefaultDescription
flint.index.[type].namedefaultThe index name
flint.index.[type].path/psml/contentThe root folder of the content to index
flint.index.[type].template[name].xslThe name of the XSLT template used to generate the iXML content
flint.index.[type].autosuggestsComma separated list of autosuggest definitions
flint.index.[type].[autosuggest].fieldsComma separated list of field names to search in the autosuggest
flint.index.[type].[autosuggest].termsfalseIf terms are returned or field values
flint.index.[type].[autosuggest].result-fieldsComma separated list of field names to return

Property reference

All the properties below are prefixed by flint.

Property threads.number

The property specifies the number of threads used by Flint when indexing content. The number of threads will depend on the amount of content to index in batches.

 

Property threads.priority

The property specifies the priority of the indexing threads, the range is between 1 to 10.

 

Property watcher.watch

The property is used to enable/disable a folder watcher on the content to index. A watcher is used to automatically re-index any document that is added/modified/deleted in the content folder.

Folder watching is enabled by default.

 

Property watcher.root

The root folder containing the content to watch. the root folder and all its descendant folders are added to the watcher.

The default is to watch all the PSML files located in the /psml/content directory.

 

Property watcher.max-folders

If the application has too many folders to watch, the watcher is automatically turned off.

To disable a max number of folder, the value -1 can be used.

Property index.types

A comma separated list of index types to enable. If an index is not included in this property, its properties will be ignored.

Index specific properties

All the properties below are relevant to a specific index type, they are all prefixed by flint.index.[type].

Property name

The name of the index, it can be static or dynamic. To allow for a dynamic index, the token {name} can be used, the path must be dynamic as well then. The default value is default.

See examples below for more information.

Property path

The path of the content to index, it can be static or dynamic. The token {name} can be used for dynamic paths, the name must be dynamic as well then. The default value is /psml/content.

See examples below for more information.

Property template

The name of the XSLT template used to generate the iXML format. the XSLt template must be located in the ixml folder.

The default value is the name of the index (when static) with the extension .xsl appended.

Property autosuggests

A comma separated list of autosuggest definitions. Each autosuggest then has specific properties defined separately.

Autosuggest specific properties

All the properties below are relevant to a specific autosuggest in a specific index type, they are all prefixed by flint.index.[type].[autosuggest].

Property fields

A comma separated list of fields to search when searching for suggestion.

Property terms

If the individual terms are returned or the entire field value. Allowed values are true and false and the default value is false. Result fields are ignored if this is set to true.

Property result-fields

A comma separated list of fields to return when searching for suggestion.

 

Examples

Static indexes

The configuration below will create three separate indexes named films, actors and reviews, each with separate content root folder and separate templates.

<flint>
  <index types="films,actors,reviews">
    <films   name="films"    path="/psml/content/films"   template="films.xsl" />
    <actors  name="actors"   path="/psml/content/actors"  template="actors.xsl"/>
    <reviews name="reviews"  path="/psml/content/reviews" template="reviews.xsl"/>
  </index>
</flint>

The configuration below will create two indexes named first and second, with separate content root folders and the same XSLT template.

<flint>
  <index types="index1,index2">
    <index1  name="first"    path="/psml/content/1"  template="indexing.xsl" />
    <index2  name="second"   path="/psml/content/2"  template="indexing.xsl"/>
  </index>
</flint>

The configurations below will all create a single index named default with the content root folder /psml/content and the template default.xsl.

<flint>
  <index types="default">
    <default name="default" path="/psml/content" template="default.xsl" />
  </index>
</flint>
<flint>
  <index types="default">
    <default name="default" path="/psml/content" />
  </index>
</flint>
<flint>
  <index types="default" />
</flint>
<flint/>

Dynamic indexes

To create indexes based on content folders:

<flint>
  <index types="folders">
    <folders name="{name}" path="/psml/content/{name}" template="default.xsl" />
  </index>
</flint>

Each folder under the /psml/content root folder will have a corresponding index created.

 

To create books indexes where each book content is located under /psml/content/books/*.

<flint>
  <index types="books">
    <books name="book-{name}"
           path="/psml/content/books/{name}"
           template="books.xsl" />
  </index>
</flint>

If the following folders exist:

/psml/content/books/001
/psml/content/books/002
/psml/content/books/003

The following indexes will be created:

book-001
book-002
book-003

 

Autosuggest examples

 

<flint>
  <index types="articles,books,dictionary">
    <articles name="article-{name}" path="/psml/content/articles/{name}"
              template="article.xsl" autosuggests="search">
      <search fields="title,fulltext" result-fields="title,type,date,author" />
    </articles>
    <books name="book-{name}" path="/psml/content/books/{name}"
           template="books.xsl" autosuggests="titles">
      <titles fields="title,chapter-title,section-title"
              result-fields="title,icon,publication-date,author" />
    </books>
    <dictionary name="dictionary" path="/psml/content/dictionary"
                template="dictionary.xsl" autosuggests="definition">
      <definition fields="definition" type="terms" />
    </dictionary>
  </index>
</flint>

Created on , last edited on