Table of Contents

Method UpdateFullTextIndex

Namespace
YndigoBlue.Velocity.Engine
Assembly
YndigoBlue.Velocity.dll

UpdateFullTextIndex(FullTextIndex)

Triggers a full rebuild of a full-text index, re-indexing all rows in the associated table.

public void UpdateFullTextIndex(FullTextIndex fullTextIndex)

Parameters

fullTextIndex FullTextIndex

The FullTextIndex to rebuild.

Examples

using (var m = new Manager(conn))
{
    var schema = m.LoadSchema("content");
    var table = schema["articles"];

    // Perform bulk inserts outside of ImportData ...

    // Then rebuild the full-text index
    m.UpdateFullTextIndex(table.FullTextIndex);
}

Remarks

Warning

The UpdateFullTextIndex method is not available in the Community Edition of Velocity. It requires the Full Edition.

Use this method after bulk data operations (other than ImportData(Table, string, ImportConfig)) to ensure the full-text index reflects the current table contents. ImportData(Table, string, ImportConfig) triggers this automatically when UpdateFullTextIndex is true (the default).

The behaviour is datasource-specific:

  • SQLite: Issues an FTS5 rebuild command.
  • SQL Server: Initiates a START FULL POPULATION (asynchronous).
  • Teradata: Calls the fts_metadata.REBUILD_FTS_INDEX procedure.
  • DB2: Calls SYSPROC.SYSTS_UPDATE for each indexed column.
  • MySQL / Oracle / PostgreSQL: No explicit rebuild required; indexes update automatically.

Exceptions

DbException

Thrown when a database error occurs.