{"id":116,"date":"2013-06-16T10:24:12","date_gmt":"2013-06-16T10:24:12","guid":{"rendered":"http:\/\/ramandv.com\/blog\/?p=116"},"modified":"2013-07-04T08:50:30","modified_gmt":"2013-07-04T08:50:30","slug":"installing-django-haystack-with-solr","status":"publish","type":"post","link":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/","title":{"rendered":"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1"},"content":{"rendered":"\n<!-- Quick Adsense WordPress Plugin: http:\/\/quickadsense.com\/ -->\n<div class=\"e9e85ee105af8a6a4a383deebf1fa216\" data-index=\"1\" style=\"float: none; margin:10px 0 10px 0; text-align:center;\">\n<script type=\"text\/javascript\"><!--\r\ngoogle_ad_client = \"ca-pub-4917982260456644\";\r\n\/* ramandv.com-ad1 *\/\r\ngoogle_ad_slot = \"9226290554\";\r\ngoogle_ad_width = 728;\r\ngoogle_ad_height = 90;\r\n\/\/-->\r\n<\/script>\r\n<script type=\"text\/javascript\"\r\nsrc=\"http:\/\/pagead2.googlesyndication.com\/pagead\/show_ads.js\">\r\n<\/script>\n<\/div>\n<p>Install Haystack with his dependency pysolr<\/p>\n<pre><code>pysolr==3.0.6\ndjango-haystack==2.0.0-beta\n<\/code><\/pre>\n<p>Install the solr-4.2.1 by following the steps<\/p>\n<p><a href=\"#https:\/\/django-haystack.readthedocs.org\/en\/latest\/installing_search_engines.html#solr\">https:\/\/django-haystack.readthedocs.org\/en\/latest\/installing<em>search<\/em>engines.html#solr<\/a><\/p>\n<p>Follow the tutorial to configure haystack<\/p>\n<p><a href=\"#http:\/\/django-haystack.readthedocs.org\/en\/latest\/tutorial.html\">http:\/\/django-haystack.readthedocs.org\/en\/latest\/tutorial.html<\/a><\/p>\n<h3>Configuring Solr-4.2.1<\/h3>\n<ul>\n<li>\n<p>Use the command <code>build_solr_schema<\/code> to generate the schema.xml file<\/p>\n<\/li>\n<li>\n<p>Copy the schema.xml file to the following directory<\/p>\n<p><code>`solr-4.2.1\/example\/solr\/collection1\/conf\/<\/code><\/p>\n<p>NOTE: The conf directory changed in this version<\/p>\n<\/li>\n<li>\n<p>Add the following line in the <strong><fields><\/strong> section in the schema.xml<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<pre><code>....\n&lt;field name=\"_version_\" type=\"long\" indexed=\"true\" stored =\"true\"\/&gt;\n....\n<\/code><\/pre>\n<\/blockquote>\n<pre><code>Otherwise, the following exception will be thrown\n<\/code><\/pre>\n<blockquote>\n<pre><code>Caused by: org.apache.solr.common.SolrException: _version_field must exist in schema, \nusing indexed=\"true\" stored=\"true\" and multiValued=\"false\" (_version_ does not exist)\n<\/code><\/pre>\n<\/blockquote>\n<ul>\n<li>\n<p>Update the stopwords<em>en.txt path in the schema.xml to &#8220;lang\/stopwords<\/em>en.txt&#8221;<\/p>\n<p>Otherwise, the following exception will be thrown<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<pre><code>java.io.IOException: Can't find resource 'stopwords_en.txt' in classpath \nor 'solr\/collection1\/conf\/', cwd=solr\/solr-4.2.1\/example`\n<\/code><\/pre>\n<\/blockquote>\n<ul>\n<li>Check the following ticket for more information <a href=\"#https:\/\/github.com\/toastdriven\/django-haystack\/issues\/671\">https:\/\/github.com\/toastdriven\/django-haystack\/issues\/671<\/a><\/li>\n<\/ul>\n\n<div style=\"font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;\"><\/div>","protected":false},"excerpt":{"rendered":"<p>Install Haystack with his dependency pysolr pysolr==3.0.6 django-haystack==2.0.0-beta Install the solr-4.2.1 by following the steps https:\/\/django-haystack.readthedocs.org\/en\/latest\/installingsearchengines.html#solr Follow the tutorial to configure haystack http:\/\/django-haystack.readthedocs.org\/en\/latest\/tutorial.html Configuring Solr-4.2.1 Use the command build_solr_schema to generate the schema.xml file Copy the schema.xml file to the &hellip; <a href=\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false},"categories":[8],"tags":[11,12],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1 - Articles for Developers\" \/>\n<meta property=\"og:description\" content=\"Install Haystack with his dependency pysolr pysolr==3.0.6 django-haystack==2.0.0-beta Install the solr-4.2.1 by following the steps https:\/\/django-haystack.readthedocs.org\/en\/latest\/installingsearchengines.html#solr Follow the tutorial to configure haystack http:\/\/django-haystack.readthedocs.org\/en\/latest\/tutorial.html Configuring Solr-4.2.1 Use the command build_solr_schema to generate the schema.xml file Copy the schema.xml file to the &hellip; Continue reading &rarr;\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/\" \/>\n<meta property=\"og:site_name\" content=\"Articles for Developers\" \/>\n<meta property=\"article:published_time\" content=\"2013-06-16T10:24:12+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-07-04T08:50:30+00:00\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ramandv\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/#website\",\"url\":\"http:\/\/www.ramandv.com\/blog\/\",\"name\":\"Articles for Developers\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ramandv.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/#webpage\",\"url\":\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/\",\"name\":\"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1 - Articles for Developers\",\"isPartOf\":{\"@id\":\"http:\/\/www.ramandv.com\/blog\/#website\"},\"datePublished\":\"2013-06-16T10:24:12+00:00\",\"dateModified\":\"2013-07-04T08:50:30+00:00\",\"author\":{\"@id\":\"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658\"},\"breadcrumb\":{\"@id\":\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1\"}]},{\"@type\":\"Person\",\"@id\":\"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658\",\"name\":\"ramandv\",\"url\":\"http:\/\/www.ramandv.com\/blog\/author\/ramandv\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/","og_locale":"en_US","og_type":"article","og_title":"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1 - Articles for Developers","og_description":"Install Haystack with his dependency pysolr pysolr==3.0.6 django-haystack==2.0.0-beta Install the solr-4.2.1 by following the steps https:\/\/django-haystack.readthedocs.org\/en\/latest\/installingsearchengines.html#solr Follow the tutorial to configure haystack http:\/\/django-haystack.readthedocs.org\/en\/latest\/tutorial.html Configuring Solr-4.2.1 Use the command build_solr_schema to generate the schema.xml file Copy the schema.xml file to the &hellip; Continue reading &rarr;","og_url":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/","og_site_name":"Articles for Developers","article_published_time":"2013-06-16T10:24:12+00:00","article_modified_time":"2013-07-04T08:50:30+00:00","twitter_misc":{"Written by":"ramandv","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"http:\/\/www.ramandv.com\/blog\/#website","url":"http:\/\/www.ramandv.com\/blog\/","name":"Articles for Developers","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ramandv.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/#webpage","url":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/","name":"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1 - Articles for Developers","isPartOf":{"@id":"http:\/\/www.ramandv.com\/blog\/#website"},"datePublished":"2013-06-16T10:24:12+00:00","dateModified":"2013-07-04T08:50:30+00:00","author":{"@id":"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658"},"breadcrumb":{"@id":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ramandv.com\/blog\/installing-django-haystack-with-solr\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Installing Django1.5-Haystack-2.0.0-beta with Solr-4.2.1"}]},{"@type":"Person","@id":"http:\/\/www.ramandv.com\/blog\/#\/schema\/person\/ca1ede7143462f244081566e6ff97658","name":"ramandv","url":"http:\/\/www.ramandv.com\/blog\/author\/ramandv\/"}]}},"jetpack_featured_media_url":"","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6YZCe-1S","_links":{"self":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts\/116"}],"collection":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":19,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts\/116\/revisions"}],"predecessor-version":[{"id":153,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/posts\/116\/revisions\/153"}],"wp:attachment":[{"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/media?parent=116"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/categories?post=116"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ramandv.com\/blog\/wp-json\/wp\/v2\/tags?post=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}