ConfluenceIndexer: index vs reIndex

What’s the difference between index and reIndex ?

https://docs.atlassian.com/atlassian-confluence/6.6.0/com/atlassian/confluence/search/ChangeIndexer.html
https://docs.atlassian.com/atlassian-confluence/6.6.0/com/atlassian/confluence/search/lucene/QueuingConfluenceIndexer.html

After having a look in both classes source code, it seems index and reIndex looks quite the same in their particular class (beside different log messages). This is odd, as the JavaDoc is a bit different.

Thanks for taking a look.

I was wondering the same. Unfortunately there is no log for the files to check if they were different at some point.
And it’s still not clear what one should use, if their behavior should change in the future.

We use the reIndex to update a Searchable (PersonalInformation in our case) to clarify that it’s no new record.

So I would choose the method that fits better to your use case: update = reIndex() or create = index().

When you create a document, it’s automatically indexed, right? So when you call index/reIndex it will actually always reindex the document, right?

Depends on what your “document” is. Say it’s a page, it should be automatically indexed on creation. So technically it’s always a reIndex if you trigger it later (even though you call index()).