What is the Best method to access hiberante search (lucene) files on amazon s3

我怕爱的太早我们不能终老 提交于 2019-12-11 04:09:28

问题


I am using amazon s3 to host my website (so far - very impressed), however, I want to host my hibernate search index files and subdirectories in a manner that will scale.

Could I use the Amazon s3 buckets for this? I already host user uploaded images here?

I have tried simply pointing the hibernate.search.default.indexBase at the appropriate url but it throws a write exception.

Any help appreciated!


回答1:


The indexBase configuration property expects an absolute filesystem path.

S3 "scales" because it replicates, but scaling doesn't mean it's going to be fast. The local fileystem of the server will be several orders of magnitude faster, as it can be memory-mapped rather than needing a webservice invocation for each IO operation.

If you need horizontal scalability on multiple nodes on Amason EC2, you can still use S3 as a storage point when configuring an Infinispan based index: http://docs.jboss.org/hibernate/search/4.1/reference/en-US/html_single/#infinispan-directories

(Infinispan will cache the index in local memory, but write through one of it's CacheLoader options, one of which is S3)



来源:https://stackoverflow.com/questions/9946466/what-is-the-best-method-to-access-hiberante-search-lucene-files-on-amazon-s3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!