SQLite Forum

FTS build docs inconsistency
Login

FTS build docs inconsistency

(1) By Adrian Ho (lexfiend) on 2021-03-20 02:54:50 [source]

https://sqlite.org/fts3.html#compiling_and_enabling_fts3_and_fts4 says:

Note that enabling FTS3 also makes FTS4 available. There is not a separate SQLITE_ENABLE_FTS4 compile-time option. A build of SQLite either supports both FTS3 and FTS4 or it supports neither.

But https://sqlite.org/compile.html#_options_to_enable_features_normally_turned_off defines both SQLITE_ENABLE_FTS3 and SQLITE_ENABLE_FTS4, and the FTS4 macro doc mentions adding both versions to the build, while the FTS3 macro doc only mentions version 3.

And from the amalgamation:

/*
** FTS4 is really an extension for FTS3.  It is enabled using the
** SQLITE_ENABLE_FTS3 macro.  But to avoid confusion we also all
** the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3.
*/

I don't use FTS myself, but I'll assume that the two compile-time options in fact enable exactly the same functionality, so can I suggest the following edits for clarity?

https://sqlite.org/fts3.html#compiling_and_enabling_fts3_and_fts4:

Note that enabling FTS3 also makes FTS4 available. There is not a separate SQLITE_ENABLE_FTS4 compile-time option. A build of SQLite either supports both FTS3 and FTS4 or it supports neither.

https://sqlite.org/compile.html#_options_to_enable_features_normally_turned_off:

SQLITE_ENABLE_FTS3

When this option is defined in the amalgamation, versions 3 and 4 of the full-text search engine is added to the build automatically.

SQLITE_ENABLE_FTS4

This is an alias for SQLITE_ENABLE_FTS3.