Quote:
The issue is when I merge the object into the entityManager it also creates an index for the object which would be fine regularly, but since i'm testing the reindexer it kind of defeats the purpose.
I am not following here. If automatic indexing is enabled creating an object will cause a new Lucene Document to be added to the index. This is how it should be. Maybe you should turn of automatic indexing then for your tests.
Maybe you can explain a little more what you actually want to test.
Regarding testing I recommend using a
RAMDirectoryProvider. This means that between tests you always start with a fresh index. When using a
FSDirectoryProvider you have to make sure that the index is purged between tests to avoid any unexpected behavior due to stale data.
--Hardy