首页 \ 问答 \ Sitecore和SolrCloud启动重建(Sitecore and SolrCloud switch on rebuild)

Sitecore和SolrCloud启动重建(Sitecore and SolrCloud switch on rebuild)

您可能已经知道,配置为与SolrCloud一起使用的Sitecore在重建时不支持索引切换。 有没有办法在Solr和Sitecore 8.0的4.10.3版本中实现这一目标?

我们找到了一个链接 - https://github.com/SitecoreSupport/Sitecore.Support.449298 - 但这只是从5.2.1版到5.5.1版进行了测试。 有没有人有任何为4.10.3版本实现此功能的经验? 我们可能需要注意的任何问题?

谢谢


As you may already know that Sitecore, configured to work with SolrCloud, does not support index switch on rebuild. Is there a way to achieve this with version 4.10.3 of Solr and Sitecore 8.0?

We found a link - https://github.com/SitecoreSupport/Sitecore.Support.449298 - but this has only been tested from version 5.2.1 to 5.5.1. Does anyone have any experience implementing this for version 4.10.3? Any issues that we may need to be aware of?

Thanks


原文:https://stackoverflow.com/questions/38506347
更新时间:2023-06-27 12:06

最满意答案

您的问题缺少很多信息。 但似乎你使用的是boxd2,因为如果你正在使用自定义代码处理冲突,你可以轻松解决问题。

如果您使用的是boxd2,则可以将陷阱体作为传感器。

body.getFixtureList().get(0).setSensor(true); //assuming it has only one fixture

并将其UserData设置为可以在发生冲突时检查的内容。

body.getFixtureList().get(0).setUserData("trap");

然后,定义一个联系人侦听器以检查与具有该用户数据的主体的冲突:

//define the Contact listener
public class MyContactListener implements ContactListener{

    @Override
    public void beginContact(Contact contact){
        if ((String)contact.getFixtureA().getUserData()=="trap" || (String)contact.getFixtureB().getUserData()=="trap")
            //hurt player
    }

    @Override public void endContact(Contact contact){}
    @Override public void preSolve(Contact contact, Manifold oldManifold){}
    @Override public void postSolve(Contact contact, ContactImpulse impulse){}
};

并在您的ini代码中创建和设置联系人侦听器。

MyContactListener contactListener = new MyContactListener();
world.setContactListener(contactListener);

A lot of information is lacking on your question. But it seems you are using boxd2, because if you were handling the collisions with your custom code you would easily solve your problem.

If you are using boxd2, you can make your trap body a sensor.

body.getFixtureList().get(0).setSensor(true); //assuming it has only one fixture

And set its UserData to something you can check when the collision occurs.

body.getFixtureList().get(0).setUserData("trap");

then, define a contact listener to check for collisions with bodies with that user data:

//define the Contact listener
public class MyContactListener implements ContactListener{

    @Override
    public void beginContact(Contact contact){
        if ((String)contact.getFixtureA().getUserData()=="trap" || (String)contact.getFixtureB().getUserData()=="trap")
            //hurt player
    }

    @Override public void endContact(Contact contact){}
    @Override public void preSolve(Contact contact, Manifold oldManifold){}
    @Override public void postSolve(Contact contact, ContactImpulse impulse){}
};

And create and set the contact listener in your ini code.

MyContactListener contactListener = new MyContactListener();
world.setContactListener(contactListener);

相关问答

更多
  • GWT编译器说: No source code is available for type net.dermetfan.gdx.graphics.g2d.AnimatedSprite No source code is available for type net.dermetfan.gdx.graphics.g2d.Box2DSprite AnimatedSprite驻留在libgdx-utils 。 Box2DSprite驻留在libgdx-utils-box2d 。 显然GWT缺少这些库的源代码,因 ...
  • 我不久前使用过这段代码(现在未经测试)。 它只使用了两个相互重叠的九个补丁。 您可以使用libgdx的默认外观(来自测试资源的uiskin)。 public class HealthBar extends Actor { private NinePatchDrawable loadingBarBackground; private NinePatchDrawable loadingBar; public HealthBar() { TextureAtlas sk ...
  • 我无法测试它,但如果我明白你想做什么,因为我的英语不是很好,这是一个简单的ejmplo可以改进,但我认为这就是你想要的 //变量类; float deltaYourExc = -1f; float deltaYourTime = 5f; 。 if ( Intersector . overlaps ( Object . getBoundingCircle (), myWorld . getGround ()) || (deltaYourExc <= deltaYourTime && deltaYourE ...
  • 问题有点旧,但对于其他可能在这里绊倒的人; 这是我在另一个LibGDX项目中创建/使用您自己的库项目时找到的最佳解决方案。 虽然我相信HTML项目需要进一步的步骤,我没有调查过。 Question is a little old but for others that may stumble here; This is the best solution I've found for creating/using your own library project in another LibGDX proj ...
  • 什么是spritebatch? 我们在框架中绘制了大量映射到矩形几何体的纹理,但是将每个矩形一次一个地发送到要绘制的GPU是低效的。所以这是spritebatch的作用。 private SpriteBatch batch; public void create () { batch = new SpriteBatch(); } public void render () { Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT); // This crypti ...
  • 兄弟,只需将这行代码添加到您的每个身体可能会有所帮助 body.setFixedRotation=true; bro,just add this line of code to each of your bodies may be helpful body.setFixedRotation=true;
  • 这是你的create方法: override fun create() { createBody() createBall() createGround() camera.setToOrtho(false, 800f, 480f) debugRenderer = Box2DDebugRenderer() } 在调用camera.viewportWidth之后,您正在设置相机尺寸,但camera.viewportWidth已经使用camera.viewportWid ...
  • 您的问题缺少很多信息。 但似乎你使用的是boxd2,因为如果你正在使用自定义代码处理冲突,你可以轻松解决问题。 如果您使用的是boxd2,则可以将陷阱体作为传感器。 body.getFixtureList().get(0).setSensor(true); //assuming it has only one fixture 并将其UserData设置为可以在发生冲突时检查的内容。 body.getFixtureList().get(0).setUserData("trap"); 然后,定义一个联系人侦 ...
  • 如果您正在使用scene2d,则不一定需要使用ShapeRenderer渲染某些形状。 scene2d为您提供了一个调试模式,例如在actor周围绘制设置的边界框。 这发生在drawDebug() 当然,您可以覆盖此方法以添加其他形状(将在其中使用ShapeRenderer )。 例如,如果您有一名演员代表一个球,您可能需要围绕演员的边界绘制一个圆以在调试模式下查看可点击区域。 当然,您还应该相应地覆盖collides()方法以进行正确的碰撞检测。 如果您打算在游戏中的不同角色之间进行碰撞检测,请考虑使用b ...
  • 我通过仅在deltaTime足够小时更新位置来解决它,因为deltaTime在拖动窗口时增加。 I solved it by only updating the position if deltaTime is small enough, since deltaTime increases while the window is being dragged.

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)