首页 > Web开发 > 详细

lucene和es总结

时间:2016-12-25 07:35:38      阅读:392      评论:0      收藏:0      [点我收藏+]

一、首先介绍lucene涉及到的排序过程

技术分享

1.1、如何自定义排序对象

你可以自定义collector对象;

亦可以自定义comparator对象;

可以自定义scoredoc对象,决定如何处理结果集合;

1.2、这几种自定义之间有何区别?

自定义collector和comparator有什么区别呢????????

Besides building your own Collector to customize how the results are stored and sorted, another way to customize results sorting is to implement your own FieldComparator for SortField. Note that this customization only deals with the sorting aspect of the result set; it does not give you the flexibility to filter out results, as you would have with Collector.

 

 

二、ES master slave介绍

master es中的作用就是:it’s the responsability of the master node to allocate the shards equally among the nodes. 

requests分为两种:index requests和 search requests;两种请求可以落到集群任何一台机器。

三、参考文献

http://blog.trifork.com/2013/10/24/how-to-avoid-the-split-brain-problem-in-elasticsearch/

https://github.com/xuxueli/xxl-search/blob/master/xxl-search-client/src/main/java/com/xxl/search/client/es/ElasticsearchUtil.java

 

lucene和es总结

原文:http://www.cnblogs.com/amazement/p/6218917.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!