I have a Spring MVC application with hibernate MySQL. I have the following code for hibernate Search configuration:
jpaProperties.put("hibernate.search.default.directory_provide", "filesystem");
jpaProperties.put("hibernate.search.default.indexBase", "C:\\Index");
I need to specify a folder so that Hibernate search can have index base in a filesystem. How can I achieve this in Bluemix?
Is there a way I can achieve this using Object Storage Service in Bluemix?
Although it is technically possible to do number 1 (you can for example save the index under /tmp directory), it is not recommended.
Since Bluemix is Cloud Application the local filesystem is ephemeral will be recreated every time you restart or restage your application, so you will not be able to persist that file.
You can use Object Storage to store the file and good tutorial is available here: https://developer.ibm.com/recipes/tutorials/connecting-to-ibm-object-storage-for-bluemix-with-java/