Hi,
I'm trying to build my index with the massIndexer, and i'm facing some strange problems. The indexed entity is very simple (i.e. One numeric field for ID and one String field) to index. When I launch the massindexer with startAndWait() function, the indexing takes eternity !!! I have like 300 000 entity to index and i can see that massIndexer can only index like 200 entity per minutes. Plus, I noticed in the console log that the hibernate query are running fast at the start, but after few seconds, the console output doesn't show anything. i.e., the first hundred (maybe more, maybe less) requests are super fast, but then it's "blocked" for at least 20s to 1mn. And so on for the rest of the indexing.
I've got the same results with the start() function. The field are annotated by
Code:
@DocumentId
for my id, and
Code:
@Field(name = "raisonSociale_raw", index = Index.NO, store = Store.YES)
for the string field.
Here is the code i'm using for indexing.
c is the entity class I want to index .
Code:
MassIndexer mi = getFullTextSession().createIndexer(c);
mi.batchSizeToLoadObjects(30)//
.threadsForSubsequentFetching(4)// .threadsToLoadObjects(10)//
.purgeAllOnStart(true)// .optimizeAfterPurge(true)//
.optimizeOnFinish(true).startAndWait();//
inb4 "this is a connection pool problem", this is not, i've increased the number of connection to 30 for minimum and 100 for max.
Any advice will be appreciated.