Previous topic  Top  Next topic  Print this Topic

Fulltext Indexer Settings




Default Value


on, off


enables the full text index engine. With default configuration, full text

indexes for all ontologies are automatically generated and can be used with the

_queryIndex/10 builtin.



on, off

Advanced configuration option to disable persistent change log if a persistent

datamodel (i.e. H2) is used. Has no meaning when using a RAM datamodel



Directory to use for storing the full text index files.



on, off

By default it is off (and OntoBroker's behaviour is unchanged).

If it is turned on, OntoBroker does not build or updates any indexes, but can still use the FullTextIndex infrastructure (inclusive searching indices)



on, off

If this switch is turned on, the server waits for the end of the indexing on startup, before any queries and commands are executed. Please note, that this does not apply to direct access to the KAON2 API via the OntologyManager.



on, off

If this switch is on and the OntoBroker runs with a RAM datamodel (Storage = RAM.Choose, etc), then the index file are reused on OntoBroker restart if the ontology files are the same as during the creation of the index.


The indexer can now be customized with additional fields. Values for a defined set of attributes can be added to additional Lucene index fields and then used with the _queryIndex/10 built-in or for autocompletion.

OntoBroker automatically builds an index with several predefined fields (e.g. id, name_de, name_en, all, ...) for all ontology objects if the OntoConfig.prp parameter "Indexer" is set to "on".To customize this index, you have to adapt the configuration file "indexer-context.xml" located in the configuration directory (defaults to ./conf relative to the working directory). There you can define custom index fields for the bean with the id "ObjectLogicDocumentBuilder".

Examples and Scenarios

Scenario for "FullTextIndex.WaitOnStartup":

The full text indexes are always generated and updated asynchronously in the background. If it is important that the full text index are complete directly after the start of OntoBroker, turn FullTextIndex.WaitOnStartup=on. In this case the OntoBroker waits for completion of index generation on startup before it executes any command or queries.

Scenario for "FullTextIndex.ReuseOnRestart":

If OntoBroker runs in a read-only mode, e.g. OntoBroker only loads some ontologies on startup and then the ontologies are not changed anymore (at least without saving them), this option can be used to improve startup time. If the full text indexes have already been generated, OntoBroker will them reuse them on a restart without rebuilding them.

Configuration example



  <bean id="ObjectLogicDocumentBuilder" class="com.ontoprise.indexer.flogic.ObjectLogicStandardObjectDocumentBuilder">


    <property name="customIndexFields">


          <bean class="com.ontoprise.indexer.objectlogic.CustomIndexField">

            <property name="fieldName" value="xname" />

            <property name="stored" value="true" />

            <property name="attributeNames">











In this example, one custom index field with the name "xname" is defined. The values are stored in the index for retrieval (this is only needed if it is used for autocompletion or if you want to use the return() option of the _queryIndex built-in). All values of the attributes <> and <> are indexed for any ontology object containing such an attribute.

Search Example

To search in this field with _queryIndex/10, use the Lucene syntax for fields (here "xname:") in front of your search text.

?- _queryIndex(<>, [return(xname)], "xname:Transp*", 0, 10, ?OBJ, ?TC, ?SCORE, ?ORDER, ?OPT).

Autocomplete Example

For autocomplete you have to set the search field in the AutoComplete

AutocompleteHelper helper = ...

Ontology ontology = ...

AutocompleteHelper.Type type = ...

AutocompleteHelper.Options options = new AutocompleteHelper.Options();






CompletionResults results = helper.getCompletion(ontology, options, type, "Transp", 0, 10);