首页 文章 精选 留言 我的

精选列表

搜索[全文搜索引擎],共6492篇文章
优秀的个人博客,低调大师

【Elasticsearch全文搜索引擎实战】之集群搭建及配置

文中Elasticsearch版本为6.0.1 1. 环境配置 把环境配置放在第一节来讲,是因为很多人按官网的Getting Started安装运行会有各种错误。其实都是因为一些配置不正确引起的。 首先,Elasticsearch不能以root账号运行,所以我们需要单独建立用户授权运行。 对于非root账号Linux可以进行并发操作,但是文件、线程都有限制,所以,部署Elasticsearc的机器需要进行相应配置。 修改文件限制 # 修改系统文件 vi /etc/security/limits.conf # 增加的内容 * soft nofile 65536 * hard nofile 65536 * soft nproc 2048 * hard nproc 4096 调整进程数 # 修改系统文件 vi /etc/security/limits.d/90-nproc.conf # 调整成以下配置 * soft nproc 4096 root soft nproc unlimited 调整虚拟内存&最大并发连接 # 修改系统文件 vi /etc/sysctl.conf # 增加的内容 vm.max_map_count=655360 fs.file-max=655360 保存之后执行 sysctl -p 生效 创建Elasticsearch专用用户 useradd es 创建ELK相关目录并赋权 #创建Elasticsearch APP目录 mkdir /usr/elasticsearch #创建Elasticsearch日志目录 数据目录 mkdir var/lib/elasticsearch #创建Elasticsearch日志目录 mkdir var/logs/elasticsearch #更改目录Owner chown -R es:es /usr/elasticsearch chown -R es:es var/lib/elasticsearch chown -R es:es var/logs/elasticsearch 下载Elasticsearch包并解压 https://www.elastic.co/guide/en/elasticsearch/reference/current/zip-targz.html #打开文件夹 cd /home/download #下载 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.0.1.tar.gz #解压 tar -zvxf elasticsearch-6.0.0.tar.gz 2. Elasticsearch 部署 本次一共要部署两个Elasticsearch节点,所有文中没有指定机器的操作都表示每个Elasticsearch机器都要执行该操作 移动Elasticsearch到统一目录 #移动目录 mv /home/download/elasticsearch-6.0.1 /usr/elasticsearch #赋权 chown -R elk:elk /usr/elasticsearch/ 开放端口(CentOS7+) # 增加端口 firewall-cmd --add-port=9200/tcp --permanent firewall-cmd --add-port=9300/tcp --permanent 重新加载防火墙规则(CentOS7+) firewall-cmd --reload 切换账号 #账号切换到 es su - es 2. Elasticsearch集群配置 修改配置 #打开目录 cd /usr/elasticsearch #修改配置 vi config/elasticsearch.yml 主节点配置(192.168.180.1) cluster.name: es node.name: node-1 path.data: /var/lib/elasticsearch path.logs: /var/logs/elasticsearch network.host: 192.168.180.1 http.port: 9200 node.master: true node.data: true discovery.zen.ping.unicast.hosts: ["192.168.180.1:9300","192.168.180.2:9300"] discovery.zen.minimum_master_nodes: 2 从节点配置(192.168.180.2) cluster.name: es node.name: node-2 path.data: /var/lib/elasticsearch path.logs: /var/logs/elasticsearch network.host: 192.168.180.2 http.port: 9200 node.master: false node.data: true discovery.zen.ping.unicast.hosts: ["192.168.1.31:9300","192.168.1.32:9300"] discovery.zen.minimum_master_nodes: 2 配置参数说明 参数 说明 cluster.name 集群名 node.name 节点名 path.data 数据保存目录 path.logs 日志保存目录 network.host 节点host/ip http.port HTTP访问端口 node.master 是否允许作为主节点 node.data 是否保存数据 discovery.zen.ping.unicast.hosts 集群中的主节点的初始列表,当节点(主节点或者数据节点)启动时使用这个列表进行探测 discovery.zen.minimum_master_nodes master选举最少的节点数,这个一定要设置为N/2+1,其中N是:N是具有master资格的节点的数量,而不是整个集群节点个数 3. 启动Elasticsearch 运行 #进入elasticsearch根目录 cd /usr/elasticsearch #启动 (-d 为后台运行) ./bin/elasticsearch -d 验证 访问http://192.168.180.1:9200/,可以看到如下内容则表示成功: { name: "node-1", cluster_name: "es", cluster_uuid: "Tum8l98uQfK0LdS-KnsWxg", version: { number: "6.0.1", build_hash: "601be4a", build_date: "2017-12-04T09:29:09.525Z", build_snapshot: false, lucene_version: "7.0.1", minimum_wire_compatibility_version: "5.6.0", minimum_index_compatibility_version: "5.0.0" }, tagline: "You Know, for Search" } 健康状态检查 访问http://192.168.180.1:9200/,status返回green则表示正常。 { cluster_name: "es", status: "green", timed_out: false, number_of_nodes: 2, number_of_data_nodes: 2, active_primary_shards: 16, active_shards: 32, relocating_shards: 0, initializing_shards: 0, unassigned_shards: 0, delayed_unassigned_shards: 0, number_of_pending_tasks: 0, number_of_in_flight_fetch: 0, task_max_waiting_in_queue_millis: 0, active_shards_percent_as_number: 100 } 4. Head插件 Elasticsearch head是一个用浏览器跟ES集群交互的插件,可以查看集群状态、集群的doc内容、执行搜索和普通的Rest请求等。 具体安装配置请参考另外一篇博文:http://www.cnblogs.com/mantoudev/p/8269345.html

优秀的个人博客,低调大师

RediSearch 2.0.0-M5 发布,高性能全文搜索引擎

RediSearch2.0.0-M5现已发布,这是 RedisSearch 2.0 的第五个里程碑版本。具体更新内容如下: Highlights 支持从 v1.x 升级 适用于FT.AGGREGATEAPPLY操作的geodistance函数。 Details Features #1435FT.CREATE上的NOINITIALINDEX标志可跳过在创建索引时对文档的初始扫描。 #1401支持读取旧版(由 RediSearch 1.x 创建)RDB(更多信息) #1445支持 load event,此事件允许从 RDB 加载文档时对文档建立索引,从而保证在完成 RDB 加载时索引完全可用(可从 Redis 6.0.7 及更高版本获得) #1246适用于FT.AGGREGATEAPPLY操作的geodistance函数。 Behaviour changes #1437在查询执行期间过期的文档将不会出现在结果中(但可能已计入生产的文档数)。 #1221[与 1.x 相比,具有重大变化] Synonyms 支持小写。使用 synonyms 时,这可能导致 FT.SEARCH 上的结果集不同。 Bug 修复 #1448FORK GC上罕见的文件描述符泄漏。 #1461当 cursor 继续读取由 Garbage Collection 释放的反向索引时,内存访问错误。 #1469当内部 docid 超过 uint32_max 时,会出现无限循环。 #1483#1425使用 rm_call on drop index 命令删除文档,这样文档就会从所有索引了这个文档的索引中删除。 更新说明:https://github.com/RediSearch/RediSearch/releases/tag/v1.99.5

优秀的个人博客,低调大师

当海量存储系统插上搜索引擎的翅膀,阿里云HBase增强版(Lindorm)全文索引功能技术解析

新用户9.9元即可使用6个月云数据库HBase,更有低至1元包年的入门规格供广大HBase爱好者学习研究,更多内容请参考链接 阿里云HBase增强版(Lindorm)简介 阿里云数据库HBase增强版,是基于阿里集团内部使用的Lindorm产品研发的、完全兼容HBase的云上托管数据库,从2011年开始正式承载阿里内部业务的海量数据实时存储需求,支撑服务了淘宝、支付宝、菜鸟、优酷、高德等业务中的大量核心应用,历经双十一、春晚、十一出行节等场景的大规模考验,在成本、性能、稳定性、功能、安全、易用性等方面相比社区版拥有诸多优势和企业级能力,更多介绍可以参考Lindorm帮助文档(https://help.aliyun.com/document_detail/119548.html) 当大数据存储遇上复杂查询 HBase是目前广泛使用的NoS

优秀的个人博客,低调大师

cassandra的全文检索插件

https://github.com/Stratio/cassandra-lucene-index Stratio’s Cassandra Lucene Index Stratio’s Cassandra Lucene Index, derived fromStratio Cassandra, is a plugin forApache Cassandrathat extends its index functionality to provide near real time search such as ElasticSearch or Solr, includingfull text searchcapabilities and free multivariable, geospatial and bitemporal search. It is achieved through anApache Lucenebased implementation of Cassandra secondary indexes, where each node of the cluster indexes its own data. Stratio’s Cassandra indexes are one of the core modules on whichStratio’s BigData platformis based. Indexrelevance searchesallow you to retrieve thenmore relevant results satisfying a search. The coordinator node sends the search to each node in the cluster, each node returns itsnbest results and then the coordinator combines these partial results and gives you thenbest of them, avoiding full scan. You can also base the sorting in a combination of fields. Any cell in the tables can be indexed, including those in the primary key as well as collections. Wide rows are also supported. You can scan token/key ranges, apply additional CQL3 clauses and page on the filtered results. Index filtered searches are a powerful help when analyzing the data stored in Cassandra withMapReduceframeworks asApache Hadoopor, even better,Apache Spark. Adding Lucene filters in the jobs input can dramatically reduce the amount of data to be processed, avoiding full scan. The following benchmark result can give you an idea about the expected performance when combining Lucene indexes with Spark. We do successive queries requesting from the 1% to 100% of the stored data. We can see a high performance for the index for the queries requesting strongly filtered data. However, the performance decays in less restrictive queries. As the number of records returned by the query increases, we reach a point where the index becomes slower than the full scan. So, the decision to use indexes in your Spark jobs depends on the query selectivity. The trade-off between both approaches depends on the particular use case. Generally, combining Lucene indexes with Spark is recommended for jobs retrieving no more than the 25% of the stored data. This project is not intended to replace Apache Cassandra denormalized tables, inverted indexes, and/or secondary indexes. It is just a tool to perform some kind of queries which are really hard to be addressed using Apache Cassandra out of the box features, filling the gap between real-time and analytics. More detailed information is available atStratio’s Cassandra Lucene Index documentation. Features Lucene search technology integration into Cassandra provides: Stratio’s Cassandra Lucene Index and its integration with Lucene search technology provides: Full text search (language-aware analysis, wildcard, fuzzy, regexp) Boolean search (and, or, not) Sorting by relevance, column value, and distance Geospatial indexing (points, lines, polygons and their multiparts) Geospatial transformations (bounding box, buffer, centroid, convex hull, union, difference, intersection) Geospatial operations (intersects, contains, is within) Bitemporal search (valid and transaction time durations) CQL complex types (list, set, map, tuple and UDT) CQL user defined functions (UDF) CQL paging, even with sorted searches Columns with TTL Third-party CQL-based drivers compatibility Spark and Hadoop compatibility Not yet supported: Thrift API Legacy compact storage option Indexingcountercolumns Indexing static columns Other partitioners than Murmur3 Requirements Cassandra (identified by the three first numbers of the plugin version) Java >= 1.8 (OpenJDK and Sun have been tested) Maven >= 3.0 本文转自张昺华-sky博客园博客,原文链接:http://www.cnblogs.com/bonelee/p/6757830.html,如需转载请自行联系原作者

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

WebStorm

WebStorm

WebStorm 是jetbrains公司旗下一款JavaScript 开发工具。目前已经被广大中国JS开发者誉为“Web前端开发神器”、“最强大的HTML5编辑器”、“最智能的JavaScript IDE”等。与IntelliJ IDEA同源,继承了IntelliJ IDEA强大的JS部分的功能。

用户登录
用户注册