且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

弹跳在Jhipster,春天

更新时间:2023-10-23 23:03:52

嗯,你的索引好像是空的如果您以编程方式(即不从界面)添加实体,请确保将它们保存在搜索库中。

Well, it seems that your index is empty. If you add entities programmatically (i.e. not from the interface), be sure to save them in the search repository as well.

示例:

Sample sample = new Sample();
sample.setName("bar");
sample = sampleRepository.save(sample);
sampleSearchRepository.save(sample);

您需要重新引用示例,以获取Hibernate生成的id在弹性搜索中正确索引。

You need to reaffect sample to get the id generated by Hibernate correctly indexed in elasticsearch.

更新10/02/2016

现在有一个 JHipster模块到reindex弹性搜索仓库