{"id":1393,"date":"2016-08-24T18:10:25","date_gmt":"2016-08-24T22:10:25","guid":{"rendered":"http:\/\/shirishranjit.com\/blog1\/?page_id=1393"},"modified":"2018-03-11T15:39:16","modified_gmt":"2018-03-11T19:39:16","slug":"install-and-configure-apache-solr","status":"publish","type":"page","link":"https:\/\/shirishranjit.com\/blog1\/technical-posts\/apache-solr-search-engine\/install-and-configure-apache-solr","title":{"rendered":"Apache Solr Primer  &#8211; Quick Start Guide"},"content":{"rendered":"<p>Here is the quick start to bring up a generic solr search engine.<\/p>\n<h2> Quick Guide on installing and creating a core using Solr command.<\/h2>\n<ol>\n<li>Download Apache Solr<\/li>\n<li>Install it in your favorite directory. Note it is really easy with Linux\/Mac as you can just download tar file and untar it and you are in business.<br \/>\n          Linux: <\/p>\n<pre> tar -xvf solar-?.?.tar<\/pre>\n<p>\n          Windows: <\/p>\n<pre> winzip to unzip solar-?.?.tar <\/li>\r\n\t<li>Do a quick test by starting the solr by \r\n              <pre> bin\/solr start <\/pre>\n<\/li>\n<li>check in your browser; normal1ly it is running on <strong>http:\/\/localhost:8983<\/li>\n<p><\/strong><\/p>\n<li>Now fun begins - lets create core<\/li>\n<li>First -  you will need to create a \"core\" which is similar to database schema. When indexing, you will identify by core for where the data should be index. Similarly, you will identify core for search query. Simplest way to create a new core is by following command in running Solr instance:\n<pre> .\/bin\/solr create -c example-core -s 1 -rf 1 <\/pre>\n<pre> options are \r\n-c <name>: name of the core\r\n-s <no of shards>: this sets number of the shards for the core. \r\n      This applies only when running in cloud mode. \r\n -rf <no of replication factore>: number of copies of each document in each collection<\/li>\r\n\r\n\t<li>Open the Solr Dashboard, Click on \"core selector\" where you will see your core<\/li>\r\n\t<li><strong>Solr with your core is ready for the indexing<\/strong><\/li>\r\n<\/ol>\r\n\r\n<h2>Create more core from existing core<\/h2>\r\nOnce you have your core created, you can either use the solr command line to create another core or you can do the following:\r\n<ol>\r\n\t<li>To create a new core\/collection form existing core, first identify your core<\/li>\r\n\t<li>copy whole core folder to new directory at the sample level in Solr 7.x distribution it is #SOLR_HOME\/server\/solr . \r\n <pre>cd #SOLR_HOME\/server\/solr \r\ncp -r <existing core folder> <new core folder name><\/pre>\n<\/li>\n<li>stop and start the solr instance<\/li>\n<li>Open the Solr Dashboard, Click on \"core selector\" where you will see your core<\/li>\n<\/ol>\n<h2>Solr start and stop commands.<\/h2>\n<ol>\n<li>Start the solr by\n<pre> bin\/solr start <\/pre>\n<\/li>\n<li>shutdown your solr\n<pre> bin\/solr stop <\/pre>\n<\/li>\n<\/ol>\n<p>Happy Searching and Indexing!!!!!<\/p>\n<h2>References:<\/h2>\n<ul>\n<li><a href=\"http:\/\/lucene.apache.org\/solr\/guide\/7_2\/index.html\">Solr guide for 7.2<\/a><\/li>\n<li><a href=\"http:\/\/lucene.apache.org\/solr\/guide\/7_2\/solr-control-script-reference.html#solr-control-script-reference\">Solr 7.2 script reference guide<\/a><\/li>\n<li><a href=\"http:\/\/lucene.apache.org\/solr\/guide\/7_2\/client-apis.html\">Solr 7.2 Client API guide<\/a><\/li>\n<\/ul>\n<div class=\"twttr_buttons\"><div class=\"twttr_twitter\">\n\t\t\t\t\t<a href=\"http:\/\/twitter.com\/share?text=Apache+Solr+Primer++-+Quick+Start+Guide\" class=\"twitter-share-button\" data-via=\"\" data-hashtags=\"\"  data-size=\"default\" data-url=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/apache-solr-search-engine\/install-and-configure-apache-solr\"  data-related=\"\" target=\"_blank\">Tweet<\/a>\n\t\t\t\t<\/div><div class=\"twttr_followme\">\n\t\t\t\t\t\t<a href=\"https:\/\/twitter.com\/shiranjit\" class=\"twitter-follow-button\" data-size=\"default\"  data-show-screen-name=\"false\"  target=\"_blank\">Follow me<\/a>\n\t\t\t\t\t<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Here is the quick start to bring up a generic solr search engine. Quick Guide on installing and creating a core using Solr command. Download Apache Solr Install it in your favorite directory. Note it is really easy with Linux\/Mac &hellip; <a href=\"https:\/\/shirishranjit.com\/blog1\/technical-posts\/apache-solr-search-engine\/install-and-configure-apache-solr\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"parent":864,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-1393","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/1393"}],"collection":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/comments?post=1393"}],"version-history":[{"count":14,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/1393\/revisions"}],"predecessor-version":[{"id":1716,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/1393\/revisions\/1716"}],"up":[{"embeddable":true,"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/pages\/864"}],"wp:attachment":[{"href":"https:\/\/shirishranjit.com\/blog1\/wp-json\/wp\/v2\/media?parent=1393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}