If I run my app locally, via mvn spring-boot:run or running the jar directly it works fine. My db is queried and indexes are created and saved to /tmp/lucene/indexes. However, when I upload this jar to to an aws ec2 ubuntu instance, the app will run normally, but the index files are never created. It does however, create the index folder, and a file called “write.lock” and “segments_1” I’ve set log levels for hibernate and lucene to TRACE, and the only difference is this line:
[Hibernate Search: entityloader-1] WARN o.h.s.b.i.lucene.IndexWriterHolder - HSEARCH000052: Going to force release of the IndexWriter lock
I have tried deleting the folder, deleting the write.lock file, but none of those seem to help. I’ve tried changing the permissions of the indexes folder and i’ve also tried changing the indexes folder to other locations, including /var/lucene/index and /home/ubuntu/
I am using springboot 1.5.4.RELEASE version and these hibernate dependencies
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>5.5.4.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>5.1.1.Final</version>
</dependency>
I should add, I don’t get any exceptions or errors (aside form the WARN I posted above). The indexes are simply not created, so my search suggestions field does not work.
I’m really at a loss as to what to do next.