开发者

Lucene and Django with Limited Memory

开发者 https://www.devze.com 2023-02-19 22:27 出处:网络
I\'m running a Django application on a shared web server with limited application memory. I want to incorporate Lucene for a search functionality. What are my options, given the limited amount memory?

I'm running a Django application on a shared web server with limited application memory. I want to incorporate Lucene for a search functionality. What are my options, given the limited amount memory?

I thought about usin开发者_运维百科g Solr via solrpy, but it looks like Solr is very memory hungry. Do you think it would be possible to reduce its memory footprint to a mere 15-20MB for a small dataset (only thousands of sentences).

I would prefer solutions that require only Python, but I am also open to other suggestions. Thanks in advance.


You're not going to get the JVM to even fit in 15MB. I wouldn't try to run Solr unless there's at least 200MB memory.

You could try Woosh, a pure Python search library, or Xapian, which is in C++. Haystack makes it easy to integrate either into Django.

0

精彩评论

暂无评论...
验证码 换一张
取 消