当前位置: 首页 > news >正文

网站开发费怎么做账小程序商城设计

网站开发费怎么做账,小程序商城设计,wordpress 插件 文章,京东店铺买卖平台Elasticsearch6.x和7.x的区别 1、查找方面的区别 在增删改方面,6.x和7.x是一样的,在查找方面(分为普通查找和有高亮的查找),6.x和7.x有区别。 在7.x的es中: org.springframework.data.elasticsearch.cor…

Elasticsearch6.x和7.x的区别

1、查找方面的区别

在增删改方面,6.x7.x是一样的,在查找方面(分为普通查找和有高亮的查找),6.x7.x有区别。

7.x的es中:

  • org.springframework.data.elasticsearch.core.SearchResultMapper没有这个类了

  • org.springframework.data.elasticsearch.core.ElasticsearchTemplate 已废弃

  • org.springframework.data.elasticsearch.repository.ElasticsearchRepository<T,

ID>.search(org.springframework.data.elasticsearch.core.query.Query) 已废弃

于是在普通查找带高亮的查找方面,es6.x和7.x不一样。

2、配置文件的区别

es6.x application.properties

# 旧版本以spring.data.elasticsearch.开头;访问地址配置不用声明访问协议,监听es的tcp端口
# 7.x已经弃用了
spring.data.elasticsearch.cluster-name=my-application
spring.data.elasticsearch.cluster-nodes=127.0.0.1:9300

es7.x application.properties

# 新版本以spring.elasticsearch.rest.开头;访问地址配置需要声明访问协议,直接监听es访问端口
spring.elasticsearch.rest.uris=http://localhost:9200

3、Document注解的type属性

es6.x 有type = “_doc”

@Document(indexName = "discusspost", type = "_doc", shards = 6, replicas = 3)
public class DiscussPost {}

es7.x 无type = “_doc”

@Document(indexName = "discusspost", shards = 6, replicas = 3)
public class DiscussPost {}

4、Elasticsearch Clients的区别

下方内容来自官方文档:

https://docs.spring.io/spring-data/elasticsearch/docs/4.0.1.RELEASE/reference/html/#reference

ES6.x:Transport Client

@Configuration
public class TransportClientConfig extends ElasticsearchConfigurationSupport {@Beanpublic Client elasticsearchClient() throws UnknownHostException {Settings settings = Settings.builder().put("cluster.name", "elasticsearch").build();        TransportClient client = new PreBuiltTransportClient(settings);client.addTransportAddress(new TransportAddress(InetAddress.getByName("127.0.0.1"), 9300)); return client;}@Bean(name = { "elasticsearchOperations", "elasticsearchTemplate" })public ElasticsearchTemplate elasticsearchTemplate() throws UnknownHostException {return new ElasticsearchTemplate(elasticsearchClient());}
}

ES7.x:High Level REST Client

@Configuration
public class RestClientConfig extends AbstractElasticsearchConfiguration {@Override@Beanpublic RestHighLevelClient elasticsearchClient() {final ClientConfiguration clientConfiguration = ClientConfiguration.builder()  .connectedTo("localhost:9200").build();return RestClients.create(clientConfiguration).rest();                         }
}
http://www.yayakq.cn/news/99831/

相关文章:

  • 电商网站经营性备案学生处网站建设招标公告
  • 个人网站怎么做微商网络运营主要工作内容
  • 企业网站的分类学做网站视频
  • 合肥网站建设渠道wordpress主题交友
  • h5网站如何做四川省建十五公司官网
  • 郑州网站设计的公司wordpress怎么改变布局
  • 成都营销网站建设团队开源社区源码
  • 山东省住房和城乡建设部网站佛山网红
  • 做网站不给源码吗网站建设的开票编码
  • 阿里巴巴黄页网站佛山市企业网站建设报价
  • 如何让百度快速收录网站个体营业执照可以做网站搞推广吗
  • 广州番禺营销型网站中国核工业二三建设有限公司是国企吗
  • 网站建设公司swot分析网站制作企业有哪些公司
  • 中国网站建设集团泰和网站建设
  • 网站后台登陆密码母婴门户网站模板
  • app 微网站广西住建厅八大员报名网站
  • 家纺网站模板免费ppt模板百度云资源
  • 零售网站建设方案flash企业网站模板php
  • 服务器安装完面板怎么做网站wordpress原生html5播放器
  • 要怎么才能建设一个网站网站里面如何在新闻列表上显示hot
  • jsp制作网站wordpress标签列表内页无效链接
  • 网站实名制认证备案it培训机构哪个好
  • 做网站公司高端全国网站建设公司排名
  • 领秀网站建设thinkphp网站模板下载
  • 网站优化的作业及意义网页设计框架结构
  • 如何申请建设网站域名wordpress rpc漏洞
  • 做网站所用的语言编程python
  • 推广网站免费装饰工程师
  • 佛山网站设计哪家便宜惠州百度seo在哪
  • 成都手机网站制作可以做女的游戏视频网站