Same Solr Service for multiple Sitecore instances

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite
1












Can I use same Solr service to install or use for different vanilla Sitecore 9.0.2 instances?



What is the best practice?










share|improve this question



























    up vote
    3
    down vote

    favorite
    1












    Can I use same Solr service to install or use for different vanilla Sitecore 9.0.2 instances?



    What is the best practice?










    share|improve this question

























      up vote
      3
      down vote

      favorite
      1









      up vote
      3
      down vote

      favorite
      1






      1





      Can I use same Solr service to install or use for different vanilla Sitecore 9.0.2 instances?



      What is the best practice?










      share|improve this question















      Can I use same Solr service to install or use for different vanilla Sitecore 9.0.2 instances?



      What is the best practice?







      solr best-practices






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 29 at 11:38









      Peter Prochazka

      3,3181630




      3,3181630










      asked Aug 29 at 9:31









      Pratik Wasnik

      317114




      317114




















          5 Answers
          5






          active

          oldest

          votes

















          up vote
          4
          down vote



          accepted










          Short answer is yes.



          Long answer:



          You can achieve this setup pretty easily.



          You have two or more instances of Sitecore. Make sure that these are compatible with installed version of Solr. Check it here.



          For new installations:



          Make sure you specify prefix parameter for solr cores install ps1 script:



          #define parameters 
          $prefix = "sc9u2"
          $PSScriptRoot = "C:resourcefiles"
          $XConnectCollectionService = "$prefix.xconnect"
          $sitecoreSiteName = "$prefix.sc"
          $SolrUrl = "https://localhost:8984/solr"
          $SolrRoot = "C:Solrsolr-6.6.2"
          $SolrService = "Solr"
          $SqlServer = "."
          $SqlAdminUser = "sa"
          $SqlAdminPassword= "saP4$$"

          #install solr cores for xdb
          $solrParams =
          @
          Path = "$PSScriptRootxconnect-solr.json"
          SolrUrl = $SolrUrl
          SolrRoot = $SolrRoot
          SolrService = $SolrService
          CorePrefix = $prefix


          Install-SitecoreConfiguration @solrParams -Verbose

          #install solr cores for sitecore $solrParams =
          $solrParams = @
          Path = "$PSScriptRootsitecore-solr.json"
          SolrUrl = $SolrUrl
          SolrRoot = $SolrRoot
          SolrService = $SolrService
          CorePrefix = $prefix


          Install-SitecoreConfiguration @solrParams


          This is only part of the script to demonstrate how to set CorePrefix parameter to Solr cores.



          Full script can be found here -> https://github.com/chorpo/Sitecore9Installation/blob/master/01%20Install.ps1



          For already installed instances:
          For each Solr core definition you will keep core name (name parameter) and id the same (id attribute).



          Normally config would look like this:



          <index id="sitecore_master_index" .....>
          <param desc="name">$(id)</param>
          <param desc="core">$(id)</param>


          You will just specify "core" parameter as follows:



          <param desc="core">instance1_$(id)</param> or <param desc="core">instance2_$(id)</param> as you need based on instance name.



          So config in your case would look like this at the end:



          <index id="sitecore_master_index" .....>
          <param desc="name">$(id)</param>
          <param desc="core">instancename_$(id)</param>


          For each solution you will have then config files for Solr with same file name, Solr ids and all the remaining settings. Only difference will be this "core" parameter.



          Here is the patch config to apply your instance settings per Solr core:



          <?xml version="1.0"?>
          <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
          <sitecore search:require="solr">
          <contentSearch>
          <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
          <indexes hint="list:AddIndex">
          <index id="sitecore_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_core_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_marketingdefinitions_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_marketingdefinitions_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_marketing_asset_index_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_marketing_asset_index_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_testing_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_fxm_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          <index id="sitecore_fxm_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
          <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
          </index>
          </indexes>
          </configuration>
          </contentSearch>
          </sitecore>
          </configuration>


          Do not forget about adding SXA indexes or custom indexes also if you will have them in the future and also for CD servers, you need to remove master or other unnecessary indexes from the list.



          In code you will reuse everything as you have as you are referencing solr index id so you will still reference "sitecore_master_index" or "sitecore_web_index" but based on the deployed configuration in each instance, you will effectively reference different Solr cores based on instance.



          To identify Sitecore Solr cores quickly, you can go to ShowConfig admin page and search for <indexes hint="list:AddIndex".



          You will see all 11 out of the box indexes and their respective configuration. You can quickly identify files in which are patched:



          Example of search results for list:AddIndex in admin's show config page.






          share|improve this answer






















          • as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
            – Pratik Wasnik
            Aug 29 at 12:14

















          up vote
          2
          down vote













          If you are doing on development machine yes you can do it.
          For production I don't recommend to use same Solr for different solutions.



          Just keep in mind if you have different Sitecore releases, your release should be compatible with your Solr server.



          Please have a look on Solr compatibility table : https://kb.sitecore.net/articles/227897






          share|improve this answer




















          • "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
            – James Skemp
            Aug 29 at 12:29










          • Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
            – Vlad Iobagiu
            Aug 29 at 13:19










          • Ah. So different solutions ~= different clients. Thanks.
            – James Skemp
            Aug 29 at 15:31

















          up vote
          1
          down vote













          The answer is yes, you can use the same solr service for different sitecore instances.You need to make sure that both Sitecore versions are compatible with the solr version.



          The only thing that you will need to change is the index names for the second instance.



          For example, In both instances, the Sitecore master index will have the same name.



          sitecore_master_index


          You will need to rename it to something like sitecore_master_index_instance2.
          This has to be done for all sitecore indexes namely:



          • master

          • web

          • core

          This can be done on the following configs:



          • Sitecore.ContentSearch.Solr.Index.Core.config

          • Sitecore.ContentSearch.Solr.Index.Master.config

          • Sitecore.ContentSearch.Solr.Index.Web.config





          share|improve this answer






















          • I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
            – Pratik Wasnik
            Aug 29 at 10:23






          • 2




            Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
            – Richard Seal♦
            Aug 29 at 12:01










          • Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
            – Pratik Wasnik
            Aug 29 at 12:10

















          up vote
          0
          down vote













          Yes, you can with some considerations:



          1. Ensure that core names are unique for each Sitecore instance, so that data doesn't get overwritten.

          2. Ensure that Solr server version is compatible with Sitecore.

          3. Performance might be impacted if some instances of Sitecore take heavy load and index size grows significantly. However, it should be okay for development scenarios.





          share|improve this answer



























            up vote
            0
            down vote













            As other people have mentioned here it is possible to do this by renaming all the indexes in your 2nd instance. However since you won't be doing this in Production etc then this is a bit of an odd approach and could lead to confusion.



            I'm not sure of your reasoning for this but I'm guessing it's because you don't want to have to spend time having to setup Solr again, you are not sure about how to run more than one instance of Solr on a single server or you are concerned about the performance of running multiple instances of Solr on one box.



            I would say in my experience there is no issue with installing multiple instances of Solr on one server and that it is very easy to do and maintain. I'd recommend that you use a Powershell script like one from Jeremy Davis which will install Solr on a specific port for you (e.g not: 8983) and uses NSSM to install the Solr service under a specific name. This will easily allow you to identify and mange multiple Solr instances. You can do this on a local dev machine or on a dev or even UAT Server:



            https://gist.github.com/jermdavis/8d8a79f680505f1074153f02f70b9105



            With regard to performance the -Xmx value can be set to set the amount of memory that the JVM uses so this can be managed also if required: https://lucene.apache.org/solr/guide/6_6/jvm-settings.html



            If this is not the reason please update your question to include your reasoning or comment below.



            This is a better approach in my mind as:



            • You can upgrade each instance without a dependency on another Sitecore instance

            • It separates concerns so there is not potential issues arising from another site indexing lots of content etc

            • It reduces confusion regarding config and avoids the config somehow ending up deployed to other environments

            • Performance will likely be better





            share|improve this answer




















            • I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
              – Richard Seal♦
              Aug 29 at 11:59






            • 1




              I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
              – Adam Seabridge
              Aug 29 at 12:08










            • Yup - more detail definitely needed
              – Richard Seal♦
              Aug 29 at 12:20










            Your Answer







            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "664"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f13590%2fsame-solr-service-for-multiple-sitecore-instances%23new-answer', 'question_page');

            );

            Post as a guest






























            5 Answers
            5






            active

            oldest

            votes








            5 Answers
            5






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            4
            down vote



            accepted










            Short answer is yes.



            Long answer:



            You can achieve this setup pretty easily.



            You have two or more instances of Sitecore. Make sure that these are compatible with installed version of Solr. Check it here.



            For new installations:



            Make sure you specify prefix parameter for solr cores install ps1 script:



            #define parameters 
            $prefix = "sc9u2"
            $PSScriptRoot = "C:resourcefiles"
            $XConnectCollectionService = "$prefix.xconnect"
            $sitecoreSiteName = "$prefix.sc"
            $SolrUrl = "https://localhost:8984/solr"
            $SolrRoot = "C:Solrsolr-6.6.2"
            $SolrService = "Solr"
            $SqlServer = "."
            $SqlAdminUser = "sa"
            $SqlAdminPassword= "saP4$$"

            #install solr cores for xdb
            $solrParams =
            @
            Path = "$PSScriptRootxconnect-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams -Verbose

            #install solr cores for sitecore $solrParams =
            $solrParams = @
            Path = "$PSScriptRootsitecore-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams


            This is only part of the script to demonstrate how to set CorePrefix parameter to Solr cores.



            Full script can be found here -> https://github.com/chorpo/Sitecore9Installation/blob/master/01%20Install.ps1



            For already installed instances:
            For each Solr core definition you will keep core name (name parameter) and id the same (id attribute).



            Normally config would look like this:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">$(id)</param>


            You will just specify "core" parameter as follows:



            <param desc="core">instance1_$(id)</param> or <param desc="core">instance2_$(id)</param> as you need based on instance name.



            So config in your case would look like this at the end:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">instancename_$(id)</param>


            For each solution you will have then config files for Solr with same file name, Solr ids and all the remaining settings. Only difference will be this "core" parameter.



            Here is the patch config to apply your instance settings per Solr core:



            <?xml version="1.0"?>
            <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
            <sitecore search:require="solr">
            <contentSearch>
            <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
            <indexes hint="list:AddIndex">
            <index id="sitecore_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_core_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_testing_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            </indexes>
            </configuration>
            </contentSearch>
            </sitecore>
            </configuration>


            Do not forget about adding SXA indexes or custom indexes also if you will have them in the future and also for CD servers, you need to remove master or other unnecessary indexes from the list.



            In code you will reuse everything as you have as you are referencing solr index id so you will still reference "sitecore_master_index" or "sitecore_web_index" but based on the deployed configuration in each instance, you will effectively reference different Solr cores based on instance.



            To identify Sitecore Solr cores quickly, you can go to ShowConfig admin page and search for <indexes hint="list:AddIndex".



            You will see all 11 out of the box indexes and their respective configuration. You can quickly identify files in which are patched:



            Example of search results for list:AddIndex in admin's show config page.






            share|improve this answer






















            • as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
              – Pratik Wasnik
              Aug 29 at 12:14














            up vote
            4
            down vote



            accepted










            Short answer is yes.



            Long answer:



            You can achieve this setup pretty easily.



            You have two or more instances of Sitecore. Make sure that these are compatible with installed version of Solr. Check it here.



            For new installations:



            Make sure you specify prefix parameter for solr cores install ps1 script:



            #define parameters 
            $prefix = "sc9u2"
            $PSScriptRoot = "C:resourcefiles"
            $XConnectCollectionService = "$prefix.xconnect"
            $sitecoreSiteName = "$prefix.sc"
            $SolrUrl = "https://localhost:8984/solr"
            $SolrRoot = "C:Solrsolr-6.6.2"
            $SolrService = "Solr"
            $SqlServer = "."
            $SqlAdminUser = "sa"
            $SqlAdminPassword= "saP4$$"

            #install solr cores for xdb
            $solrParams =
            @
            Path = "$PSScriptRootxconnect-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams -Verbose

            #install solr cores for sitecore $solrParams =
            $solrParams = @
            Path = "$PSScriptRootsitecore-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams


            This is only part of the script to demonstrate how to set CorePrefix parameter to Solr cores.



            Full script can be found here -> https://github.com/chorpo/Sitecore9Installation/blob/master/01%20Install.ps1



            For already installed instances:
            For each Solr core definition you will keep core name (name parameter) and id the same (id attribute).



            Normally config would look like this:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">$(id)</param>


            You will just specify "core" parameter as follows:



            <param desc="core">instance1_$(id)</param> or <param desc="core">instance2_$(id)</param> as you need based on instance name.



            So config in your case would look like this at the end:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">instancename_$(id)</param>


            For each solution you will have then config files for Solr with same file name, Solr ids and all the remaining settings. Only difference will be this "core" parameter.



            Here is the patch config to apply your instance settings per Solr core:



            <?xml version="1.0"?>
            <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
            <sitecore search:require="solr">
            <contentSearch>
            <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
            <indexes hint="list:AddIndex">
            <index id="sitecore_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_core_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_testing_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            </indexes>
            </configuration>
            </contentSearch>
            </sitecore>
            </configuration>


            Do not forget about adding SXA indexes or custom indexes also if you will have them in the future and also for CD servers, you need to remove master or other unnecessary indexes from the list.



            In code you will reuse everything as you have as you are referencing solr index id so you will still reference "sitecore_master_index" or "sitecore_web_index" but based on the deployed configuration in each instance, you will effectively reference different Solr cores based on instance.



            To identify Sitecore Solr cores quickly, you can go to ShowConfig admin page and search for <indexes hint="list:AddIndex".



            You will see all 11 out of the box indexes and their respective configuration. You can quickly identify files in which are patched:



            Example of search results for list:AddIndex in admin's show config page.






            share|improve this answer






















            • as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
              – Pratik Wasnik
              Aug 29 at 12:14












            up vote
            4
            down vote



            accepted







            up vote
            4
            down vote



            accepted






            Short answer is yes.



            Long answer:



            You can achieve this setup pretty easily.



            You have two or more instances of Sitecore. Make sure that these are compatible with installed version of Solr. Check it here.



            For new installations:



            Make sure you specify prefix parameter for solr cores install ps1 script:



            #define parameters 
            $prefix = "sc9u2"
            $PSScriptRoot = "C:resourcefiles"
            $XConnectCollectionService = "$prefix.xconnect"
            $sitecoreSiteName = "$prefix.sc"
            $SolrUrl = "https://localhost:8984/solr"
            $SolrRoot = "C:Solrsolr-6.6.2"
            $SolrService = "Solr"
            $SqlServer = "."
            $SqlAdminUser = "sa"
            $SqlAdminPassword= "saP4$$"

            #install solr cores for xdb
            $solrParams =
            @
            Path = "$PSScriptRootxconnect-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams -Verbose

            #install solr cores for sitecore $solrParams =
            $solrParams = @
            Path = "$PSScriptRootsitecore-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams


            This is only part of the script to demonstrate how to set CorePrefix parameter to Solr cores.



            Full script can be found here -> https://github.com/chorpo/Sitecore9Installation/blob/master/01%20Install.ps1



            For already installed instances:
            For each Solr core definition you will keep core name (name parameter) and id the same (id attribute).



            Normally config would look like this:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">$(id)</param>


            You will just specify "core" parameter as follows:



            <param desc="core">instance1_$(id)</param> or <param desc="core">instance2_$(id)</param> as you need based on instance name.



            So config in your case would look like this at the end:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">instancename_$(id)</param>


            For each solution you will have then config files for Solr with same file name, Solr ids and all the remaining settings. Only difference will be this "core" parameter.



            Here is the patch config to apply your instance settings per Solr core:



            <?xml version="1.0"?>
            <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
            <sitecore search:require="solr">
            <contentSearch>
            <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
            <indexes hint="list:AddIndex">
            <index id="sitecore_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_core_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_testing_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            </indexes>
            </configuration>
            </contentSearch>
            </sitecore>
            </configuration>


            Do not forget about adding SXA indexes or custom indexes also if you will have them in the future and also for CD servers, you need to remove master or other unnecessary indexes from the list.



            In code you will reuse everything as you have as you are referencing solr index id so you will still reference "sitecore_master_index" or "sitecore_web_index" but based on the deployed configuration in each instance, you will effectively reference different Solr cores based on instance.



            To identify Sitecore Solr cores quickly, you can go to ShowConfig admin page and search for <indexes hint="list:AddIndex".



            You will see all 11 out of the box indexes and their respective configuration. You can quickly identify files in which are patched:



            Example of search results for list:AddIndex in admin's show config page.






            share|improve this answer














            Short answer is yes.



            Long answer:



            You can achieve this setup pretty easily.



            You have two or more instances of Sitecore. Make sure that these are compatible with installed version of Solr. Check it here.



            For new installations:



            Make sure you specify prefix parameter for solr cores install ps1 script:



            #define parameters 
            $prefix = "sc9u2"
            $PSScriptRoot = "C:resourcefiles"
            $XConnectCollectionService = "$prefix.xconnect"
            $sitecoreSiteName = "$prefix.sc"
            $SolrUrl = "https://localhost:8984/solr"
            $SolrRoot = "C:Solrsolr-6.6.2"
            $SolrService = "Solr"
            $SqlServer = "."
            $SqlAdminUser = "sa"
            $SqlAdminPassword= "saP4$$"

            #install solr cores for xdb
            $solrParams =
            @
            Path = "$PSScriptRootxconnect-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams -Verbose

            #install solr cores for sitecore $solrParams =
            $solrParams = @
            Path = "$PSScriptRootsitecore-solr.json"
            SolrUrl = $SolrUrl
            SolrRoot = $SolrRoot
            SolrService = $SolrService
            CorePrefix = $prefix


            Install-SitecoreConfiguration @solrParams


            This is only part of the script to demonstrate how to set CorePrefix parameter to Solr cores.



            Full script can be found here -> https://github.com/chorpo/Sitecore9Installation/blob/master/01%20Install.ps1



            For already installed instances:
            For each Solr core definition you will keep core name (name parameter) and id the same (id attribute).



            Normally config would look like this:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">$(id)</param>


            You will just specify "core" parameter as follows:



            <param desc="core">instance1_$(id)</param> or <param desc="core">instance2_$(id)</param> as you need based on instance name.



            So config in your case would look like this at the end:



            <index id="sitecore_master_index" .....>
            <param desc="name">$(id)</param>
            <param desc="core">instancename_$(id)</param>


            For each solution you will have then config files for Solr with same file name, Solr ids and all the remaining settings. Only difference will be this "core" parameter.



            Here is the patch config to apply your instance settings per Solr core:



            <?xml version="1.0"?>
            <configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
            <sitecore search:require="solr">
            <contentSearch>
            <configuration type="Sitecore.ContentSearch.ContentSearchConfiguration, Sitecore.ContentSearch">
            <indexes hint="list:AddIndex">
            <index id="sitecore_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_core_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketingdefinitions_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_master" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_marketing_asset_index_web" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_testing_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_suggested_test_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_master_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            <index id="sitecore_fxm_web_index" type="Sitecore.ContentSearch.SolrProvider.SolrSearchIndex, Sitecore.ContentSearch.SolrProvider">
            <param desc="core" patch:instead="param[@desc='core']">instancename_$(id)</param>
            </index>
            </indexes>
            </configuration>
            </contentSearch>
            </sitecore>
            </configuration>


            Do not forget about adding SXA indexes or custom indexes also if you will have them in the future and also for CD servers, you need to remove master or other unnecessary indexes from the list.



            In code you will reuse everything as you have as you are referencing solr index id so you will still reference "sitecore_master_index" or "sitecore_web_index" but based on the deployed configuration in each instance, you will effectively reference different Solr cores based on instance.



            To identify Sitecore Solr cores quickly, you can go to ShowConfig admin page and search for <indexes hint="list:AddIndex".



            You will see all 11 out of the box indexes and their respective configuration. You can quickly identify files in which are patched:



            Example of search results for list:AddIndex in admin's show config page.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 31 at 11:40

























            answered Aug 29 at 11:36









            Peter Prochazka

            3,3181630




            3,3181630











            • as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
              – Pratik Wasnik
              Aug 29 at 12:14
















            • as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
              – Pratik Wasnik
              Aug 29 at 12:14















            as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
            – Pratik Wasnik
            Aug 29 at 12:14




            as mentioned by Richard , for Sitecore v9 "the solr cores are already prefixed with the instance name. So no extra work is required". For previous versions , you along with other developers have given answers ! Wonderful responses by Sitecore Community ! Cheers !
            – Pratik Wasnik
            Aug 29 at 12:14










            up vote
            2
            down vote













            If you are doing on development machine yes you can do it.
            For production I don't recommend to use same Solr for different solutions.



            Just keep in mind if you have different Sitecore releases, your release should be compatible with your Solr server.



            Please have a look on Solr compatibility table : https://kb.sitecore.net/articles/227897






            share|improve this answer




















            • "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
              – James Skemp
              Aug 29 at 12:29










            • Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
              – Vlad Iobagiu
              Aug 29 at 13:19










            • Ah. So different solutions ~= different clients. Thanks.
              – James Skemp
              Aug 29 at 15:31














            up vote
            2
            down vote













            If you are doing on development machine yes you can do it.
            For production I don't recommend to use same Solr for different solutions.



            Just keep in mind if you have different Sitecore releases, your release should be compatible with your Solr server.



            Please have a look on Solr compatibility table : https://kb.sitecore.net/articles/227897






            share|improve this answer




















            • "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
              – James Skemp
              Aug 29 at 12:29










            • Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
              – Vlad Iobagiu
              Aug 29 at 13:19










            • Ah. So different solutions ~= different clients. Thanks.
              – James Skemp
              Aug 29 at 15:31












            up vote
            2
            down vote










            up vote
            2
            down vote









            If you are doing on development machine yes you can do it.
            For production I don't recommend to use same Solr for different solutions.



            Just keep in mind if you have different Sitecore releases, your release should be compatible with your Solr server.



            Please have a look on Solr compatibility table : https://kb.sitecore.net/articles/227897






            share|improve this answer












            If you are doing on development machine yes you can do it.
            For production I don't recommend to use same Solr for different solutions.



            Just keep in mind if you have different Sitecore releases, your release should be compatible with your Solr server.



            Please have a look on Solr compatibility table : https://kb.sitecore.net/articles/227897







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 29 at 9:41









            Vlad Iobagiu

            11.5k2729




            11.5k2729











            • "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
              – James Skemp
              Aug 29 at 12:29










            • Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
              – Vlad Iobagiu
              Aug 29 at 13:19










            • Ah. So different solutions ~= different clients. Thanks.
              – James Skemp
              Aug 29 at 15:31
















            • "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
              – James Skemp
              Aug 29 at 12:29










            • Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
              – Vlad Iobagiu
              Aug 29 at 13:19










            • Ah. So different solutions ~= different clients. Thanks.
              – James Skemp
              Aug 29 at 15:31















            "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
            – James Skemp
            Aug 29 at 12:29




            "For production I don't recommend to use same Solr for different solutions." Can you elaborate why?
            – James Skemp
            Aug 29 at 12:29












            Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
            – Vlad Iobagiu
            Aug 29 at 13:19




            Are some partners who offer hosting for their clients and I saw cases they host multiple clients solutions on a single solr server.
            – Vlad Iobagiu
            Aug 29 at 13:19












            Ah. So different solutions ~= different clients. Thanks.
            – James Skemp
            Aug 29 at 15:31




            Ah. So different solutions ~= different clients. Thanks.
            – James Skemp
            Aug 29 at 15:31










            up vote
            1
            down vote













            The answer is yes, you can use the same solr service for different sitecore instances.You need to make sure that both Sitecore versions are compatible with the solr version.



            The only thing that you will need to change is the index names for the second instance.



            For example, In both instances, the Sitecore master index will have the same name.



            sitecore_master_index


            You will need to rename it to something like sitecore_master_index_instance2.
            This has to be done for all sitecore indexes namely:



            • master

            • web

            • core

            This can be done on the following configs:



            • Sitecore.ContentSearch.Solr.Index.Core.config

            • Sitecore.ContentSearch.Solr.Index.Master.config

            • Sitecore.ContentSearch.Solr.Index.Web.config





            share|improve this answer






















            • I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
              – Pratik Wasnik
              Aug 29 at 10:23






            • 2




              Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
              – Richard Seal♦
              Aug 29 at 12:01










            • Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
              – Pratik Wasnik
              Aug 29 at 12:10














            up vote
            1
            down vote













            The answer is yes, you can use the same solr service for different sitecore instances.You need to make sure that both Sitecore versions are compatible with the solr version.



            The only thing that you will need to change is the index names for the second instance.



            For example, In both instances, the Sitecore master index will have the same name.



            sitecore_master_index


            You will need to rename it to something like sitecore_master_index_instance2.
            This has to be done for all sitecore indexes namely:



            • master

            • web

            • core

            This can be done on the following configs:



            • Sitecore.ContentSearch.Solr.Index.Core.config

            • Sitecore.ContentSearch.Solr.Index.Master.config

            • Sitecore.ContentSearch.Solr.Index.Web.config





            share|improve this answer






















            • I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
              – Pratik Wasnik
              Aug 29 at 10:23






            • 2




              Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
              – Richard Seal♦
              Aug 29 at 12:01










            • Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
              – Pratik Wasnik
              Aug 29 at 12:10












            up vote
            1
            down vote










            up vote
            1
            down vote









            The answer is yes, you can use the same solr service for different sitecore instances.You need to make sure that both Sitecore versions are compatible with the solr version.



            The only thing that you will need to change is the index names for the second instance.



            For example, In both instances, the Sitecore master index will have the same name.



            sitecore_master_index


            You will need to rename it to something like sitecore_master_index_instance2.
            This has to be done for all sitecore indexes namely:



            • master

            • web

            • core

            This can be done on the following configs:



            • Sitecore.ContentSearch.Solr.Index.Core.config

            • Sitecore.ContentSearch.Solr.Index.Master.config

            • Sitecore.ContentSearch.Solr.Index.Web.config





            share|improve this answer














            The answer is yes, you can use the same solr service for different sitecore instances.You need to make sure that both Sitecore versions are compatible with the solr version.



            The only thing that you will need to change is the index names for the second instance.



            For example, In both instances, the Sitecore master index will have the same name.



            sitecore_master_index


            You will need to rename it to something like sitecore_master_index_instance2.
            This has to be done for all sitecore indexes namely:



            • master

            • web

            • core

            This can be done on the following configs:



            • Sitecore.ContentSearch.Solr.Index.Core.config

            • Sitecore.ContentSearch.Solr.Index.Master.config

            • Sitecore.ContentSearch.Solr.Index.Web.config






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Aug 29 at 10:12









            Pratik Wasnik

            317114




            317114










            answered Aug 29 at 9:44









            adarsh

            6111311




            6111311











            • I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
              – Pratik Wasnik
              Aug 29 at 10:23






            • 2




              Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
              – Richard Seal♦
              Aug 29 at 12:01










            • Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
              – Pratik Wasnik
              Aug 29 at 12:10
















            • I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
              – Pratik Wasnik
              Aug 29 at 10:23






            • 2




              Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
              – Richard Seal♦
              Aug 29 at 12:01










            • Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
              – Pratik Wasnik
              Aug 29 at 12:10















            I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
            – Pratik Wasnik
            Aug 29 at 10:23




            I have small doubt , by default Sitecore instance name is prefixed before the index/core name like "sc902_core_index", so is renaming of the index/core required ?
            – Pratik Wasnik
            Aug 29 at 10:23




            2




            2




            Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
            – Richard Seal♦
            Aug 29 at 12:01




            Depends on the version of Sitecore, since SIF and v9, the solr cores are already prefixed with the instance name. So no extra work is required. Prior to that, then you would need to manually do that. Also there are far more cores than just the 3 for a Sitecore 9 instance.
            – Richard Seal♦
            Aug 29 at 12:01












            Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
            – Pratik Wasnik
            Aug 29 at 12:10




            Thanks for clarification Richard , yes my previous instance also is of Sitecore 902 version, hence was confused !
            – Pratik Wasnik
            Aug 29 at 12:10










            up vote
            0
            down vote













            Yes, you can with some considerations:



            1. Ensure that core names are unique for each Sitecore instance, so that data doesn't get overwritten.

            2. Ensure that Solr server version is compatible with Sitecore.

            3. Performance might be impacted if some instances of Sitecore take heavy load and index size grows significantly. However, it should be okay for development scenarios.





            share|improve this answer
























              up vote
              0
              down vote













              Yes, you can with some considerations:



              1. Ensure that core names are unique for each Sitecore instance, so that data doesn't get overwritten.

              2. Ensure that Solr server version is compatible with Sitecore.

              3. Performance might be impacted if some instances of Sitecore take heavy load and index size grows significantly. However, it should be okay for development scenarios.





              share|improve this answer






















                up vote
                0
                down vote










                up vote
                0
                down vote









                Yes, you can with some considerations:



                1. Ensure that core names are unique for each Sitecore instance, so that data doesn't get overwritten.

                2. Ensure that Solr server version is compatible with Sitecore.

                3. Performance might be impacted if some instances of Sitecore take heavy load and index size grows significantly. However, it should be okay for development scenarios.





                share|improve this answer












                Yes, you can with some considerations:



                1. Ensure that core names are unique for each Sitecore instance, so that data doesn't get overwritten.

                2. Ensure that Solr server version is compatible with Sitecore.

                3. Performance might be impacted if some instances of Sitecore take heavy load and index size grows significantly. However, it should be okay for development scenarios.






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 29 at 9:45









                grg

                1,129111




                1,129111




















                    up vote
                    0
                    down vote













                    As other people have mentioned here it is possible to do this by renaming all the indexes in your 2nd instance. However since you won't be doing this in Production etc then this is a bit of an odd approach and could lead to confusion.



                    I'm not sure of your reasoning for this but I'm guessing it's because you don't want to have to spend time having to setup Solr again, you are not sure about how to run more than one instance of Solr on a single server or you are concerned about the performance of running multiple instances of Solr on one box.



                    I would say in my experience there is no issue with installing multiple instances of Solr on one server and that it is very easy to do and maintain. I'd recommend that you use a Powershell script like one from Jeremy Davis which will install Solr on a specific port for you (e.g not: 8983) and uses NSSM to install the Solr service under a specific name. This will easily allow you to identify and mange multiple Solr instances. You can do this on a local dev machine or on a dev or even UAT Server:



                    https://gist.github.com/jermdavis/8d8a79f680505f1074153f02f70b9105



                    With regard to performance the -Xmx value can be set to set the amount of memory that the JVM uses so this can be managed also if required: https://lucene.apache.org/solr/guide/6_6/jvm-settings.html



                    If this is not the reason please update your question to include your reasoning or comment below.



                    This is a better approach in my mind as:



                    • You can upgrade each instance without a dependency on another Sitecore instance

                    • It separates concerns so there is not potential issues arising from another site indexing lots of content etc

                    • It reduces confusion regarding config and avoids the config somehow ending up deployed to other environments

                    • Performance will likely be better





                    share|improve this answer




















                    • I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
                      – Richard Seal♦
                      Aug 29 at 11:59






                    • 1




                      I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
                      – Adam Seabridge
                      Aug 29 at 12:08










                    • Yup - more detail definitely needed
                      – Richard Seal♦
                      Aug 29 at 12:20














                    up vote
                    0
                    down vote













                    As other people have mentioned here it is possible to do this by renaming all the indexes in your 2nd instance. However since you won't be doing this in Production etc then this is a bit of an odd approach and could lead to confusion.



                    I'm not sure of your reasoning for this but I'm guessing it's because you don't want to have to spend time having to setup Solr again, you are not sure about how to run more than one instance of Solr on a single server or you are concerned about the performance of running multiple instances of Solr on one box.



                    I would say in my experience there is no issue with installing multiple instances of Solr on one server and that it is very easy to do and maintain. I'd recommend that you use a Powershell script like one from Jeremy Davis which will install Solr on a specific port for you (e.g not: 8983) and uses NSSM to install the Solr service under a specific name. This will easily allow you to identify and mange multiple Solr instances. You can do this on a local dev machine or on a dev or even UAT Server:



                    https://gist.github.com/jermdavis/8d8a79f680505f1074153f02f70b9105



                    With regard to performance the -Xmx value can be set to set the amount of memory that the JVM uses so this can be managed also if required: https://lucene.apache.org/solr/guide/6_6/jvm-settings.html



                    If this is not the reason please update your question to include your reasoning or comment below.



                    This is a better approach in my mind as:



                    • You can upgrade each instance without a dependency on another Sitecore instance

                    • It separates concerns so there is not potential issues arising from another site indexing lots of content etc

                    • It reduces confusion regarding config and avoids the config somehow ending up deployed to other environments

                    • Performance will likely be better





                    share|improve this answer




















                    • I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
                      – Richard Seal♦
                      Aug 29 at 11:59






                    • 1




                      I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
                      – Adam Seabridge
                      Aug 29 at 12:08










                    • Yup - more detail definitely needed
                      – Richard Seal♦
                      Aug 29 at 12:20












                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    As other people have mentioned here it is possible to do this by renaming all the indexes in your 2nd instance. However since you won't be doing this in Production etc then this is a bit of an odd approach and could lead to confusion.



                    I'm not sure of your reasoning for this but I'm guessing it's because you don't want to have to spend time having to setup Solr again, you are not sure about how to run more than one instance of Solr on a single server or you are concerned about the performance of running multiple instances of Solr on one box.



                    I would say in my experience there is no issue with installing multiple instances of Solr on one server and that it is very easy to do and maintain. I'd recommend that you use a Powershell script like one from Jeremy Davis which will install Solr on a specific port for you (e.g not: 8983) and uses NSSM to install the Solr service under a specific name. This will easily allow you to identify and mange multiple Solr instances. You can do this on a local dev machine or on a dev or even UAT Server:



                    https://gist.github.com/jermdavis/8d8a79f680505f1074153f02f70b9105



                    With regard to performance the -Xmx value can be set to set the amount of memory that the JVM uses so this can be managed also if required: https://lucene.apache.org/solr/guide/6_6/jvm-settings.html



                    If this is not the reason please update your question to include your reasoning or comment below.



                    This is a better approach in my mind as:



                    • You can upgrade each instance without a dependency on another Sitecore instance

                    • It separates concerns so there is not potential issues arising from another site indexing lots of content etc

                    • It reduces confusion regarding config and avoids the config somehow ending up deployed to other environments

                    • Performance will likely be better





                    share|improve this answer












                    As other people have mentioned here it is possible to do this by renaming all the indexes in your 2nd instance. However since you won't be doing this in Production etc then this is a bit of an odd approach and could lead to confusion.



                    I'm not sure of your reasoning for this but I'm guessing it's because you don't want to have to spend time having to setup Solr again, you are not sure about how to run more than one instance of Solr on a single server or you are concerned about the performance of running multiple instances of Solr on one box.



                    I would say in my experience there is no issue with installing multiple instances of Solr on one server and that it is very easy to do and maintain. I'd recommend that you use a Powershell script like one from Jeremy Davis which will install Solr on a specific port for you (e.g not: 8983) and uses NSSM to install the Solr service under a specific name. This will easily allow you to identify and mange multiple Solr instances. You can do this on a local dev machine or on a dev or even UAT Server:



                    https://gist.github.com/jermdavis/8d8a79f680505f1074153f02f70b9105



                    With regard to performance the -Xmx value can be set to set the amount of memory that the JVM uses so this can be managed also if required: https://lucene.apache.org/solr/guide/6_6/jvm-settings.html



                    If this is not the reason please update your question to include your reasoning or comment below.



                    This is a better approach in my mind as:



                    • You can upgrade each instance without a dependency on another Sitecore instance

                    • It separates concerns so there is not potential issues arising from another site indexing lots of content etc

                    • It reduces confusion regarding config and avoids the config somehow ending up deployed to other environments

                    • Performance will likely be better






                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 29 at 10:09









                    Adam Seabridge

                    5,363742




                    5,363742











                    • I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
                      – Richard Seal♦
                      Aug 29 at 11:59






                    • 1




                      I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
                      – Adam Seabridge
                      Aug 29 at 12:08










                    • Yup - more detail definitely needed
                      – Richard Seal♦
                      Aug 29 at 12:20
















                    • I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
                      – Richard Seal♦
                      Aug 29 at 11:59






                    • 1




                      I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
                      – Adam Seabridge
                      Aug 29 at 12:08










                    • Yup - more detail definitely needed
                      – Richard Seal♦
                      Aug 29 at 12:20















                    I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
                    – Richard Seal♦
                    Aug 29 at 11:59




                    I do this all the time on my development machine. I might be working on 3 or 4 different projects at a time. No need to install Solr 4 times. Just use the same instance.
                    – Richard Seal♦
                    Aug 29 at 11:59




                    1




                    1




                    I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
                    – Adam Seabridge
                    Aug 29 at 12:08




                    I think thats fine on a dev machine. There wasn't really enough detail in the question to know what the context was here though.
                    – Adam Seabridge
                    Aug 29 at 12:08












                    Yup - more detail definitely needed
                    – Richard Seal♦
                    Aug 29 at 12:20




                    Yup - more detail definitely needed
                    – Richard Seal♦
                    Aug 29 at 12:20

















                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsitecore.stackexchange.com%2fquestions%2f13590%2fsame-solr-service-for-multiple-sitecore-instances%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Popular posts from this blog

                    How to check contact read email or not when send email to Individual?

                    Bahrain

                    Postfix configuration issue with fips on centos 7; mailgun relay