Disable Indexing in Magnolia/Jackrabbit
By default every repository is indexed by lucene in jackrabbit which is used as repository in Magnolia 2. The process of indexing is time consuming at startup and seems to require even more runtime memory. Most importantly some implementations of the underlying FileSystem produce errors over time.
Searching is generally not required in the config, users and userroles repository and likely not in the author instance of the website repository.
Making the changes indicated below disables the creation of the actual index and the ability to query the repository.
- drop the NonQueryHandler source file into src/main/info/magnolia/jackrabbit
- if you have an existing repository drop the workspace.xml file into every <repository>/workspace/default directory replacing the existing one
- if you create a new repository, copy the repository-noindex.xml into src/webapps/WEB-INF/config/ and adjust repository-configuration.xml accordingly BEFORE building
- re-build magnolia
- replace the magnolia jar file with the new one
You should see much improved startup times as well as only a dummy index.dat file or directory. The log file should state the initialisation of the NonQueryHandler.