N-Gram Index

(1Q18)


This article will provide some information on how to configure eXist-db's ngram index.

Index Configuration

To create an n-gram index, add a <ngram> element directly below the root <index> node of a collection.xconf document:

<collection xmlns="http://exist-db.org/collection-config/1.0">
  <index>
    <lucene>
      <text qname="SPEECH">
        <ignore qname="SPEAKER"/>
      </text>
      <text qname="TITLE"/>
    </lucene>
    <ngram qname="SPEAKER"/>
  </index>
</collection>

The ngram index only supports index definitions by qname. The path attribute is not supported. There are no additional parameters to be specified.