ConfluenceIndexer: index vs reIndex

lucene

#1

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


#2

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.


#3

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.


#4

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().


#5

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


#6

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()).