Do not build the index document if index is disabled. Fixes #13