LibreOffice Writer Concordance File Indexing Guide

Creating an alphabetical index manually in a large document can be tedious and prone to errors. LibreOffice Writer solves this by supporting concordance files (.sdi), which are structured plain-text files that automate the search and indexing process across an entire manuscript. This guide details the essential techniques for structuring, configuring, and applying concordance files to generate accurate, automated document indexes in LibreOffice Writer.

Understanding the Concordance File Structure

A concordance file is a standard text file containing specific fields separated by semicolons (;). Each line represents a single search rule that LibreOffice evaluates when generating the index.

The standard syntax for a line in a concordance file consists of six parameters:

Search term;Alternative entry;1st key;2nd key;Match case;Word only

Parameter Breakdown


Core Concordance File Techniques

1. Basic Exact Matching

To find standard terms throughout your document and list them directly in the index, define only the search term, match case, and word boundary parameters.

2. Standardizing Synonyms with Alternative Entries

When different terms in the text refer to the same concept, use the second field to consolidate them under a single index entry.

3. Multi-Level Hierarchical Indexing

Organize complex subjects into primary and secondary categories using 1st and 2nd keys.

4. Avoiding False Positives with Strict Flags

Acronyms and short terms often appear as substrings within unrelated words. Restrict matches using boolean flags in fields five and six.


Applying the Concordance File in LibreOffice Writer

Once your .sdi file is created and saved, apply it to your document using the following steps:

  1. Open your document in LibreOffice Writer.
  2. Place the cursor where the alphabetical index should appear (typically at the end of the document).
  3. Navigate to Insert > Table of Contents and Index > Table of Contents, Index or Bibliography….
  4. In the dialog box, set the Type dropdown to Alphabetical Index.
  5. Under the Options section, check the Concordance file checkbox.
  6. Click the File button next to the checkbox, select Open, and browse to your .sdi file.
  7. Click OK to generate the automated index.

To refresh the index after making document edits, right-click inside the generated index and select Update Index.