vine-comment / vine

a 3rd party comment system [python] [javascript]
32 stars 6 forks source link

Search engine added. #10

Open geekan opened 10 years ago

geekan commented 10 years ago

Now we have a search engine, consists of haystack and whoosh. Indexes are defined in vine_comment/search_indexes.py. Visit http://127.0.0.1:8000/search/ to make a search.

NOTE: we need to build indexes periodically. Use a crontab if needed.

geekan commented 10 years ago

./manage.py rebuild_index or ./manage.py update_index may help you.

geekan commented 10 years ago

And note we should install two more apps by pip. Check this commit: https://github.com/vine-comment/vine/commit/e1479bb4ad5ca6bd742b11374689132c1304f963

geekan commented 10 years ago

reading for some topics like http://stackoverflow.com/questions/2271600/elasticsearch-sphinx-lucene-solr-xapian-which-fits-for-which-usage and http://stackoverflow.com/questions/10213009/solr-vs-elasticsearch and http://solr-vs-elasticsearch.com/ , I think it may be better to use elastic search or solr.

Whoosh doesn't support facet now.

geekan commented 10 years ago

Record: Maybe we should need new version of haystack. Use pip install git+https://github.com/toastdriven/django-haystack.git to install it.

geekan commented 10 years ago

Currently the haystack's maintainer is not active. So maybe we could only hack haystack by ourselves, or use another backend instead of whoosh.

ElasticSearch may be a good choice.

geekan commented 10 years ago

Check this url: http://www.elasticsearch.org/overview/elkdownloads/ to download ElasticSearch.

geekan commented 10 years ago

@cloundpig @geekben Search engine has been changed. Note to install it.

geekan commented 10 years ago

Note that after installing elasticsearch binary, you should run pip install elasticsearch