Skip to end of metadata
Go to start of metadata

The following instructions can be applied only on Nuxeo 5.1 instances. On Nuxeo 5.3+ (with the SQL Visible Content Store instead of the JCR backend) the fulltext index is stored directly in the database so there is no possibility of having a de-synchrononized fulltext index.

Usually one wants to perform a reindexing when there are dead/ghost documents, ie some documents appear in the search pages while when one follows the link there is no document in the end. Dead/ghost documents also may break dashboards for other users than the administrators during the evaluation of the Write permission.

Note that the full repository reindexing may take a lot of time, depending on the number of stored documents.

Note also that certain events/actions (rights change) may trigger a recursive reindexing on the domain.

There are 2 ways to perform a reindexing:

  • Using the nuxeo-shell
  • Using the web interface

Using the nuxeo-shell

The complete doc on how to use the nuxeo shell: http://doc.nuxeo.org/5.1/books/nuxeo-book/html-single/#nuxeo-shell

Note that at this time the nuxeo-shell is very sensitive to dependencies (you might need to add some JARs depending on the actions you want to do) and that a nuxeo-shell version might only work with a certain Nuxeo server version.

Reindexing everything

There is a built-in index command.

This is the safest choice and should always work, but it is long.

Steps to follow:

  1. Stop the server
  2. Remove the "index" folder
  3. Restart the server
  4. Proceed with the reindexing

This is how to remove the "index" folder:

This is how to proceed with the reindexing (the default port for remoting is 62474):

The foo directory creation and deletion is to cause index structure being initialized.
The reindexing will then recreate the deleted "index" directory.

The full syntax of the index command is as follows:

For example to only reindex what's below a workspace proceed as follows:

Removing only dead documents

Removing only dead/ghost/obsolete documents can be achieved through a script.
Download fixIndexedGhosts.js from http://hg.nuxeo.org/addons/nuxeo-shell-scripts

This option is the fastest one.
It will not recreate a deleted index directory (the default port for remoting is 62474).

Using the web interface

Using the web interface is discouraged and this possibility may not be provided anymore in future versions of Nuxeo.

This is because the reindexing through the web UI is considered to produce a bad indexing by the developers.

Follow the "Advanced search" link that should be present on every page.

Then at the bottom there is a "Administrate the search service" section with a "Reindex" button with a "From path" parameter. This "Reindex" action will reindex the repository down from the specified path.

If no "From path" is given, then all this is the whole repository that will be reindexed.

Note that this action is not modal and that the form will return instantly while the reindexing will happen in the background.

The web user interface won't show when it is done. The only way to know when it is done, is to read the server.log log file and find a line like:

Timeout problems

There might be timeout problems while reindexing which could cause failure to reindex or partial reindexing. If this is the case you should inspect the server logs and you might find something like:

First step to try to avoid timeouts is to reduce the batch size of the reindexing, for example by specifying a batch size of 10 documents:

If it's not enough, the server search timeout, which is very low by default, should be increased.
To do so, in $JBOSS_HOME/server/default/deploy/nuxeo.ear/system/nuxeo-platform-search-compass-plugin-*.jar/compass.cfg.xml put:

Putting a value higher than 300 is not recommended unless the JBoss transaction timeout is increased too.

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.