Open geekan opened 10 years ago
./manage.py rebuild_index
or ./manage.py update_index
may help you.
And note we should install two more apps by pip. Check this commit: https://github.com/vine-comment/vine/commit/e1479bb4ad5ca6bd742b11374689132c1304f963
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.
Record:
Maybe we should need new version of haystack.
Use pip install git+https://github.com/toastdriven/django-haystack.git
to install it.
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.
Check this url: http://www.elasticsearch.org/overview/elkdownloads/ to download ElasticSearch.
@cloundpig @geekben Search engine has been changed. Note to install it.
Note that after installing elasticsearch binary, you should run pip install elasticsearch
Now we have a search engine, consists of
haystack
andwhoosh
. Indexes are defined invine_comment/search_indexes.py
. Visithttp://127.0.0.1:8000/search/
to make a search.NOTE: we need to build indexes periodically. Use a crontab if needed.