Spring Boot 中使用 SolrCloud

栏目: Java · 发布时间: 8年前

内容简介:Spring Boot 中使用 SolrCloud

SolrCloud 简介

Lucene是一个 Java 语言编写的利用倒排原理实现的文本检索类库;

Solr是以Lucene为基础实现的文本检索应用服务。Solr部署方式有单机方式、多机Master-Slaver方式、Cloud方式。

SolrCloud是基于Solr和Zookeeper的分布式搜索方案。当索引越来越大,一个单一的系统无法满足磁盘需求,查询速度缓慢,此时就需要分布式索引。在分布式索引中,原来的大索引,将会分成多个小索引,solr可以将这些小索引返回的结果合并,然后返回给客户端。

准备

环境安装

CentOs7.3 搭建 SolrCloud 集群服务

https://segmentfault.com/a/1190000010836061

测试用例

Github 代码

代码我已放到 Github ,导入 spring-boot-solr-cloud 项目

github https://github.com/souyunku/spring-boot-examples/tree/master/spring-boot-solr-cloud

添加依赖

启用 Solr

映射的实体类

继承 SolrCrudRepository

CloudSolrClient 工具类

参数配置

application.properties

单元测试

一些查询,响应

代码我已放到 Github ,导入 spring-boot-solr-cloud 项目

github https://github.com/souyunku/spring-boot-examples/tree/master/spring-boot-solr-cloud

Contact

  • 作者:鹏磊

  • 出处:http://www.ymq.io/2017/10/18/solr-cloud-spring-boot-example

  • Email:admin@souyunku.com

  • 版权归作者所有,转载请注明出处

  • Wechat:关注公众号,搜云库,专注于开发技术的研究与知识分享

Spring Boot 中使用 SolrCloud


以上所述就是小编给大家介绍的《Spring Boot 中使用 SolrCloud》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

C++ How to Program (5th Edition) (How to Program)

C++ How to Program (5th Edition) (How to Program)

Harvey & Paul) Deitel & Associates / Prentice Hall / 2005-01-05 / USD 98.00

With over 250,000 sold, Harvey and Paul Deitel's C++ How to Program is the world's best-selling introduction to C++ programming. Now, this classic has been thoroughly updated! The Deitels' groundbreak......一起来看看 《C++ How to Program (5th Edition) (How to Program)》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具