guide
全中文翻译没那么多时间,这里列个内容索引,便于有目的的查询。
1 Reference
1.1 Setup
1.1.1 Installation 讲述安装
1.1.2 Configuration 配置文件和群集配置方式
1.1.3 Directory Layout 安装后的目录结构
1.2 Glossary of terms 文本使用的一些术语。
1.2.1 analysis 分析
1.2.2 cluster
1.2.3 document 文档,对应于sql中就是一条记录
1.2.4 id 主键
1.2.5 field 字段
1.2.6 index 索引,相当于库
1.2.7 mapping 映射相当于表结构
1.2.8 node 节点群集相关
1.2.9 primary shard 主分片,相当于表空间,一旦确定不能变更。
1.2.10 replica shard 分片副本
1.2.11 routing 路由,指示document存储到哪个shard上面
1.2.12 shard 分片
1.2.13 source field 源字段,document存储在这个key上
1.2.14 term 分词后的关键字
1.2.15 text 文本
1.2.16 type 类型相当于table
1.3 API 介绍ES的操作接口,接口支持HTTP协议还有其他。
1.3.1 core 增删改查
1.3.1.1 Index 索引一个document(insert)
1.3.1.2 Delete 删除一个document
1.3.1.3 Get 直接获取一个document(select)
1.3.1.4 Multi Get 获取多个document
1.3.1.5 Update 更新document(update)
1.3.1.6 Search 介绍查询接口,查询支持get参数和requestbody 两种方式
1.3.1.6.1 Request Body
1.3.1.6.2 URI Request
1.3.1.6.3 Query 查询
1.3.1.6.4 Filter 过滤,和查询类似,**query会影响facet范围,但是filter不会。**
1.3.1.6.5 From / Size 分页
1.3.1.6.6 Indices / Types 指定index和type
1.3.1.6.7 Sort 排序
1.3.1.6.8 Rescore document的权值
1.3.1.6.9 Suggest 返回输入字符串的建议值,这个类似于搜索引擎的suggest功能
1.3.1.6.10 Highlighting 高亮
1.3.1.6.11 Fields 字段
1.3.1.6.12 Script Fields 脚本编程
1.3.1.6.13 Preference 首选项
1.3.1.6.14 Facets 统计面
1.3.1.6.15 Named Filters 可以对过滤器设置名字
1.3.1.6.16 Search Type 查询的类型
1.3.1.6.17 Index Boost 指示查询优化的参数
1.3.1.6.18 Scroll 卷动,类似于游标的概念,用于大记录集的管理。
1.3.1.6.19 Explain 解释一个查询
1.3.1.6.20 Version document的版本
1.3.1.6.21 Min Score document的最低分数。
1.3.1.7 Multi Search 跨索引检索
1.3.1.8 Percolate 预匹配器,类似于订阅的概念,可以检查一个文档符合哪些订阅条件。
1.3.1.9 Bulk 批量接口
1.3.1.10 Bulk UDP UDP协议下的批量接口
1.3.1.11 Count 计数,只返回计数结构而不返回具体列表
1.3.1.12 Delete By Query 删除
1.3.1.13 More Like This 返回相似的结构。
1.3.1.14 Validate 验证一个查询语法,用于开发。
1.3.1.15 Explain 查询解释。
1.3.2 indices 指令(下面的列表都是命令相关的,相当于数据库里的DDL)
1.3.2.1 Aliases 别名,
1.3.2.2 Analyze 查询分析
1.3.2.3 Create Index 创建索引(schema)
1.3.2.4 Delete Index 删除索引
1.3.2.5 Open/Close Index 打开关闭
1.3.2.6 Get Settings
1.3.2.7 Get Mapping 设置类型映射
1.3.2.8 Put Mapping
1.3.2.9 Delete Mapping
1.3.2.10 Refresh
1.3.2.11 Optimize
1.3.2.12 Flush
1.3.2.13 Snapshot 只在gateway模式下可用。
1.3.2.14 Update Settings
1.3.2.15 Templates 预先设置的mapping模板。当type符合条件的时候应用。
1.3.2.16 Warmers 查询预热,提高速度
1.3.2.17 Stats 关于index的统计资料
1.3.2.18 Status 关于系统的状态信息
1.3.2.19 Segments 段,Lucene里面的文件
1.3.2.20 Clear Cache
1.3.2.21 Indices Exists 索引是否存在
1.3.2.22 Types Exists 检查type存在
1.3.3 cluster 群集相关的状态查询、指令操作。
1.3.3.1 Health
1.3.3.2 State
1.3.3.3 Update Settings
1.3.3.4 Nodes Info
1.3.3.5 Nodes Stats
1.3.3.6 Nodes Shutdown
1.3.3.7 Nodes Hot Threads
1.3.3.8 Cluster reroute
1.4 Query DSL 这里详细介绍了search的时候可以使用的语法,query和filter类似,看一半就对另一半熟悉了。
1.4.1 queries 介绍query的时候可以使用的语法。
1.4.1.1 match
1.4.1.2 multi_match
1.4.1.3 bool
1.4.1.4 boosting
1.4.1.5 ids
1.4.1.6 custom_score
1.4.1.7 custom_boost_factor
1.4.1.8 constant_score
1.4.1.9 dis_max
1.4.1.10 field
1.4.1.11 filtered
1.4.1.12 flt
1.4.1.13 flt_field
1.4.1.14 fuzzy
1.4.1.15 has_child
1.4.1.16 has_parent
1.4.1.17 match_all
1.4.1.18 mlt
1.4.1.19 mlt_field
1.4.1.20 prefix
1.4.1.21 query_string
1.4.1.22 range
1.4.1.23 regexp
1.4.1.24 span_first
1.4.1.25 span_multi
1.4.1.26 span_near
1.4.1.27 span_not
1.4.1.28 span_or
1.4.1.29 span_term
1.4.1.30 term
1.4.1.31 terms
1.4.1.32 common
1.4.1.33 top_children
1.4.1.34 wildcard
1.4.1.35 nested
1.4.1.36 custom_filters_score
1.4.1.37 indices
1.4.1.38 text
1.4.1.39 geo_shape
1.4.2 filters 介绍过滤使用的语法
1.4.2.1 and
1.4.2.2 bool
1.4.2.3 exists
1.4.2.4 ids
1.4.2.5 limit
1.4.2.6 type
1.4.2.7 geo_bbox
1.4.2.8 geo_distance
1.4.2.9 geo_distance_range
1.4.2.10 geo_polygon
1.4.2.11 geo_shape
1.4.2.12 has_child
1.4.2.13 has_parent
1.4.2.14 match_all
1.4.2.15 missing
1.4.2.16 not
1.4.2.17 numeric_range
1.4.2.18 or
1.4.2.19 prefix
1.4.2.20 query
1.4.2.21 range
1.4.2.22 regexp
1.4.2.23 script
1.4.2.24 term
1.4.2.25 terms
1.4.2.26 nested
1.5 Mapping 详细介绍内置数据字段和数据类型
1.5.1 fields
1.5.1.1 _uid id和type的结合
1.5.1.2 _id
1.5.1.3 _type
1.5.1.4 _source
1.5.1.5 _all
1.5.1.6 _analyzer
1.5.1.7 _boost
1.5.1.8 _parent
1.5.1.9 _routing
1.5.1.10 _index
1.5.1.11 _size
1.5.1.12 _timestamp document的时间字段,默认是添加的时候的时间,可以映射的某个字
段上
1.5.1.13 _ttl 生存时间过期doc会自动删除。
1.5.2 types 这里介绍所有支持的数据类型
1.5.2.1 core 基本类型string long int date,
日期支持unix timestamp,和ISO标准的字符串解析(eg 2013-06-15T14:28:45.000+08:00)。
在自动生成mapping的时候可以把iso日期字符串映射成date类型,如果是unix timestamp则映射成long。注意,如果你提交的字符串没有时区,ES会认为这个时间是GTM0的时间,做统计的时候就是多了8个小时
在系统内部日期是使用unix long来存储的。
1.5.2.2 array 数组型
1.5.2.3 object 对象
1.5.2.4 root object
1.5.2.5 nested
1.5.2.6 multi_field
1.5.2.7 ip 支持ipv4 to int
1.5.2.8 geo_point 支持地理数据索引
1.5.2.9 geo_shape
1.5.2.10 attachment 附件,通过插件支持,并且还能索引附件元信息。
1.5.3 misc
1.5.3.1 Meta
1.5.3.2 Node Config node级别的mapping配置。
1.6 Modules 这里介绍ES的组成模块。
1.6.1 Discovery 群集相关
1.6.2 Gateway 群集相关
1.6.3 HTTP httpapi
1.6.4 Transport 群集相关
1.6.5 Network 网络设置
1.6.6 Indices 索引模块
1.6.7 Cluster 群集相关
1.6.8 Scripting 支持的脚本字段。
1.6.9 Thread Pool 线程池设置
1.6.10 Node
1.6.11 Plugins 介绍插件体系和一个插件列表。
1.6.12 JMX
1.6.13 memcached 接口api
1.6.14 Thrift 接口api
1.7 Index Modules 介绍索引模块这个和lucene对应
1.7.1 Analysis
1.7.1.1 analyzers
1.7.1.1.1 Standard
1.7.1.1.2 Simple
1.7.1.1.3 Whitespace
1.7.1.1.4 Stop
1.7.1.1.5 Keyword
1.7.1.1.6 Pattern
1.7.1.1.7 Language
1.7.1.1.8 Snowball
1.7.1.1.9 Custom
1.7.1.2 tokenizers
1.7.1.2.1 Edge NGram
1.7.1.2.2 Keyword
1.7.1.2.3 Letter
1.7.1.2.4 Lowercase
1.7.1.2.5 NGram
1.7.1.2.6 Standard
1.7.1.2.7 Whitespace
1.7.1.2.8 Pattern
1.7.1.2.9 UAX URL Email
1.7.1.2.10 Path Hierarchy
1.7.1.3 token filter
1.7.1.3.1 Standard
1.7.1.3.2 ASCII Folding
1.7.1.3.3 Length
1.7.1.3.4 Lowercase
1.7.1.3.5 NGram
1.7.1.3.6 Edge NGram
1.7.1.3.7 Porter Stem
1.7.1.3.8 Shingle
1.7.1.3.9 Stop
1.7.1.3.10 Word Delimiter
1.7.1.3.11 Stemmer
1.7.1.3.12 Stemmer Override
1.7.1.3.13 Keyword Marker
1.7.1.3.14 Keyword Repeat
1.7.1.3.15 KStem
1.7.1.3.16 Snowball
1.7.1.3.17 Phonetic
1.7.1.3.18 Synonym
1.7.1.3.19 Compound Word
1.7.1.3.20 Reverse
1.7.1.3.21 Elision
1.7.1.3.22 Truncate
1.7.1.3.23 Unique
1.7.1.3.24 Pattern Replace
1.7.1.3.25 Trim
1.7.1.3.26 Hunspell
1.7.1.3.27 Limit
1.7.1.4 char filter
1.7.1.4.1 Mapping
1.7.1.4.2 HTML Strip
1.7.1.5 plugin
1.7.1.5.1 ICU
1.7.2 Shard Allocation
1.7.3 Slow Log
1.7.4 Merge
1.7.5 Store
1.7.6 Mapper
1.7.7 Translog
1.7.8 Cache
1.7.9 Field data
1.7.10 Codec
1.7.11 Similarity
1.8 River 河,数据推拉插件可以从别的地方直接拉去数据。
1.8.1 CouchDB
1.8.2 RabbitMQ
1.8.3 Twitter
1.8.4 Wikipedia
1.9 Java API 介绍官方的java api
1.9.1 Client
1.9.2 Index
1.9.3 Get
1.9.4 Delete
1.9.5 Bulk
1.9.6 Search
1.9.7 Facets
1.9.8 Percolate
1.9.9 Query DSL
1.9.9.1 Queries
1.9.9.2 Filters
2 Clients & Integrations 介绍第三方lib
2.1 Groovy API groovy 的api
2.2 Client 介绍java 库的接口
2.2.1 Index
2.2.2 Get
2.2.3 Delete
2.2.4 Search