What is a good sample solrconfig.xml for django-haystack?
I am building out a solr instance for django, but the example provided from solr is super verbose, with many things that are not relevant to haystack. A sample with spelling suggestions, morelikethis, and faceting, without the extra stuff that haystack do开发者_如何学运维esn't use would go a long way to helping me understand what is needed and what isn't.
I use this one. I works and fits my needs, except for morelikethis that wasn't that good and I don't use faceting.
You should not use an "out of the box" solr config. You should understand your search requirements and write a schema and config that matches.
This is one of the drawbacks of the way people use haystack. They rely on the default behaviour which is very rarely the optimum behaviour for solr.
You shouldn't need to write an xml file - one of the benefits of Haystack is that it does that for you. Once your searchindex classes are defined, just run ./manage.py build_solr_schema
and copy the resulting xml to your solrconfig file.
精彩评论