首页 \ 问答 \ Sitecore:为多站点设置Solr核心的最佳实践(Sitecore: Best practices for setting up Solr core for multisite)

Sitecore:为多站点设置Solr核心的最佳实践(Sitecore: Best practices for setting up Solr core for multisite)

我知道我们可以在Solr中创建N个核心。 但我对于为sitecore多站点实现设置Solr核心的最佳实践有点不清楚。 场景:我们在一个sitecore实例中有5个站点。 每个站点都有搜索功能要求。

最佳实践问题:

  1. 每个站点可以共享核心索引和主索引吗?

  2. 并为Web索引创建特定于站点的核心?

  3. 我们是否需要设置配置文件或类似文件以建立站点与solr核心之间的关系?

3.1。 我猜,每个站点都需要有sitecore solr索引配置文件吗? 例如Sitecore.ContentSearch.Solr.SiteA.Index.Web(包含自定义索引名称的开箱即用索引文件的副本?)

  1. 我们是否需要编写任何智能(网站上下文),以便搜索将使用正确的solr Core?

I understand that we can create N number of Cores in Solr. But I'm bit unclear on best practices for setting of Solr core for sitecore multisite implementation. Scenario: We have 5 sites in one sitecore instance. Each sites have search capability requirement.

Best practice questions:

  1. Is it ok for each sites to share core and master index?

  2. And, create a site specific cores for web index?

  3. Do we need to setup the configuration file or similar in order to establish relationship between site(s) vs. solr core?

3.1. And I guess, each site needs to have sitecore solr index configuration file? e.g. Sitecore.ContentSearch.Solr.SiteA.Index.Web (copy of out of box index file which contains custom indexing name?)

  1. Do we need to write any smartness (site context) such that search will use the correct solr Core?

原文:https://stackoverflow.com/questions/33060048
更新时间:2023-04-09 19:04

最满意答案

我推荐Travis CI + Heroku

您只需使用git push就可以直接部署到heroku,但我希望在此之前使用Travis构建并运行测试。

网上有一些指南,但我会尝试直接指向:

你需要什么?

  • Github帐号
  • Travis帐户(与github链接,如果是开源免费)
  • Heroku应用程序(免费dyno工作很棒)

建立

在您的github仓库中,创建以下文件:

之后转到Travis帐户,添加您的存储库并为其启用构建。

这是一个示例最小配置文件内容(基于我部署到heroku的应用程序):

.travis.yml

language: go
go:
  - tip
deploy:
  provider: heroku
  buildpack: https://github.com/kr/heroku-buildpack-go.git
  api_key:
    secure: <your heroku api key encripted with travis encrypt>
  on: master 

Procfile

worker: your-app-binary

。去-DIR

your-app-binary

Procfile和.go-dir是heroku配置,所以如果你正在部署一个web应用程序它会有所不同,你可以在heroku文档中阅读更多内容

一个重要且容易遗漏的点是构建包 ,没有它,部署将无法工作。

阅读Travis文档,了解如何加密heroku密钥

怎么运行的?

基本上,每次推送到您的存储库都会触发Travis CI构建,如果它通过它会将应用程序部署到heroku,所以你设置一次,构建+部署只是一个推动;)

此外,Travis将自动构建并更新所有Pull请求的状态到您的存储库。

要查看我的配置和构建,请使用我的工作配置查看我的Travis构建我的存储库


I recommend Travis CI + Heroku.

You can deploy to heroku directly with just a git push, but I like to use Travis to build and run the tests before that.

There are some guides online but I'll try to go directly to the point:

What you will need?

  • Github account
  • Travis account (linked with github, free if open source)
  • Empty Heroku app (Free dyno works great)

Setup

In your github repo, create the following files:

After that go to your Travis account, add your repository and enabled the build for it.

Here is a sample minimal config file content (based on my app that I deploy to heroku):

.travis.yml

language: go
go:
  - tip
deploy:
  provider: heroku
  buildpack: https://github.com/kr/heroku-buildpack-go.git
  api_key:
    secure: <your heroku api key encripted with travis encrypt>
  on: master 

Procfile

worker: your-app-binary

.go-dir

your-app-binary

Procfile and .go-dir are heroku configs so it can vary if you are deploying a web app, you can read more at the heroku documentation

One important and easily missed point is the build pack, without it the deploy will not work.

Read the Travis docs to see how to encrypt the heroku key

How it works?

Basically, every push to your repository will trigger the Travis CI build, if it passes it will deploy the app to heroku, so you set this up once and build + deploy is just a push away ;)

Also Travis will build and updated the status of all Pull Requests to your repository automagically.

To see my config and build, please take a look at my Travis build and my repository with my working configs

相关问答

更多
  • 作为BuildMaster的开发人员,我可以说这种情况称为“核心版本”模式,是一种常见的模式。 如果您对付费解决方案没问题,则可以在工具中设置完全按照您所描述的方式设置部署计划。 作为一个更具体的例子,我们以稍微不同的方式体验这种确切的情况。 BuildMaster有一组60多个扩展,依赖于特定的SDK版本。 在我们最近的4.0版本中,由于SDK中的API更改中断,我们不得不重新部署每个扩展。 这基本上相当于拥有一大堆客户并同时部署到他们。 我们已经设置了部署计划,以便每当我们创建SDK应用程序的新版本时, ...
  • 由于您正在使用Java,因此您可能会考虑使用Hudson(在您的其他问题中也提到过),它可以执行包含多个“步骤”的构建任务。一步可以是单元测试Java App,另一个单元测试一个PHP应用程序,另一个deployinhg Java应用程序,另一个部署PHP应用程序(并且您可以添加更多; P) 它有一个Maven插件,所以你可以使用现有的Maven脚本。 Since you're working with Java, you might consider using Hudson (also mentione ...
  • 我不喜欢你提到的任何建议,但我承认偶尔会使用它们。 要做的最好的事情是确保在看似“随机”失败的情况下尽一切可能获取关于为什么它失败的所有数据。 这是一个环境问题吗? 机器上的其他一些过程是否会干扰测试? 这是一个计时问题,只有在网站载入速度极慢或快速增长时才会出现。 你可能会尝试的一件事是浸泡测试你的自动化测试。 在同一个版本和相同的环境中运行每个版本100次以上(因此您可以将这些版本排除为潜在的故障点),并找出偶尔发生故障的版本。 看看他们是否在同一个地方或不同的地方失败。 一般来说,当你通过这个练习时, ...
  • 通常最好构建一次,将二进制文件存储在某处(例如NuGet),然后将其用于所有部署。 看到 http://www.informit.com/articles/article.aspx?p=1621865&seqNum=3 对于SQL脚本,您可以使用db迁移工具,例如dbdeploy。 我的同事的以下文章使用我们的CD工具Go来描述整个过程,但您可以轻松地使用Jenkins的信息。 http://lyricsoft.blogspot.in/2012/08/we-are-often-asked-about-usi ...
  • 我使用Puppet进行服务器的某些部署/初始配置。 基于Java的项目Maven和Ant。 I use Puppet for some of the deployements / initial configuration of server. Maven and Ant for Java based projects.
  • 是的,这个有很多来源: http://subversion.open.collab.net/articles/IntegratingSubversionIntoYourAntBuild.html http://ant.apache.org/manual/Tasks/ftp.html或http://www.developer.com/java/print.php/998241 另外,我不确定Cold Fusion世界中的等价物是什么,但你应该研究单元测试和一个linting工具。 linting工具可以检查无 ...
  • 我记得在邮件列表上看过这个主题...... http://grails.1312388.n4.nabble.com/Incremental-Deployment-td3066617.html ...他们建议使用rsync或xdelta3仅传输更新的文件。 没试过,但它可能对你有所帮助? I remember seeing this subject on the mailing list... http://grails.1312388.n4.nabble.com/Incremental-Deployment ...
  • 我推荐Travis CI + Heroku 。 您只需使用git push就可以直接部署到heroku,但我希望在此之前使用Travis构建并运行测试。 网上有一些指南,但我会尝试直接指向: 你需要什么? Github帐号 Travis帐户(与github链接,如果是开源免费) 空Heroku应用程序(免费dyno工作很棒) 建立 在您的github仓库中,创建以下文件: .travis.yml(有关Travis CI文档的更多信息) Procfile 。去-DIR 之后转到Travis帐户,添加您的存储库 ...
  • 一种简单的方法是在预构建脚本中复制app.config文件,您可以在应用程序的属性页面Build events中定义该脚本。 你可以这样做: 1)创建仅用于部署到生产的解决方案配置,并在脚本中打开它,例如 if ($(ConfigurationName)) == (PublishConfig) call ReplaceAppConfig.cmd 或者,如果您只在特定计算机上构建发布配置: 2)始终在预构建事件中运行脚本: call CheckAndReplaceAppConfig.cmd 在这种情况下 ...
  • 您应该查看Google Cloud Deployment Manager 。 它“为您自动创建和管理Google Cloud Platform资源”,这意味着它可以创建Google容器引擎群集以及创建部署。 查看GKE部署管理器示例应该有助于您入门。 You should take a look at Google Cloud Deployment Manager. It "automates the creation and management of your Google Cloud Platform ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。