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
最满意答案
您的问题缺少很多信息。 但似乎你使用的是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);
相关问答
更多-
libgdx utils HTML(libgdx utils HTML)[2023-01-18]
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 ...
-
动画之间的libGDX延迟(libGDX delay between animations)[2023-02-10]
我无法测试它,但如果我明白你想做什么,因为我的英语不是很好,这是一个简单的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;
-
libgdx地面不起作用(libgdx ground doesnt work)[2023-12-05]
这是你的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"); 然后,定义一个联系人侦 ...
-
LibGDX shapeRenderer(LibGDX shapeRenderer)[2022-07-02]
如果您正在使用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.