use of com.tangtang.elasticsearchexample.domain.Tutorial in project benchmark by seelunzi.
the class TestContreller method testSaveArticleIndex.
@RequestMapping("/add")
public void testSaveArticleIndex() {
Author author = new Author();
author.setId(1L);
author.setName("tianshouzhi");
author.setRemark("java developer");
Tutorial tutorial = new Tutorial();
tutorial.setId(1L);
tutorial.setName("elastic search");
Article article = new Article();
article.setId(1L);
article.setTitle("springboot integreate elasticsearch");
article.setAbstracts("springboot integreate elasticsearch is very easy");
article.setTutorial(tutorial);
article.setAuthor(author);
article.setContent("elasticsearch based on lucene," + "spring-data-elastichsearch based on elaticsearch" + ",this tutorial tell you how to integrete springboot with spring-data-elasticsearch");
article.setPostTime(new Date());
article.setClickCount(1L);
articleSearchRepository.save(article);
}
Aggregations