Elasticsearch 高手之路
  • Introduction
  • First Chapter
  • 1.ElasticSearch 5.x 安装
    • 1.1.Window 环境
    • 1.2.Linux 环境
  • 2.基础学前班
  • 3.基础
    • 3.1.配置文件
    • 3.2.Mapping
      • 3.2.1.字段的数据类型
        • 3.2.1.1.核心数据类型
        • 3.2.1.2.复合数据类型
        • 3.2.1.3.Geo地理数据类型
        • 3.2.1.4.特定数据类型
      • 3.2.2.Meta-Fields(元字段)
        • _index,_uid,_type,_id 元字段
        • _source,_size 元字段
        • _all, _field_names元字段
        • _parent,_routing 元字段
        • _meta 元字段
      • 3.2.3.Mapping parameters(映射参数)
        • analyzer(分析器)
        • normalizer(归一化)
        • boost(提升)权重
        • Coerce(强制类型转换)
        • copy_to(合并参数)
        • doc_values(文档值)
        • dynamic(动态设置)
        • enabled(开启字段)
        • fielddata(字段数据)
        • format (日期格式)
        • ignore_above(忽略超越限制的字段)
        • ignore_malformed(忽略格式不对的数据)
        • include_in_all(_all 查询包含字段)
        • index_options(索引设置)
        • index (索引)
        • fields(字段)
        • norms (标准信息)
        • null_value(空值)
        • position_increment_gap(短语位置间隙)
        • properties (属性)
        • search_analyzer (搜索分析器)
        • similarity (相似度模型)
        • store(存储)
        • term_vectors(词根信息)
      • 3.2.4.Dynamic Mapping(动态映射)
        • _default_ mapping(mapping中的_default_)
        • Dynamic field mapping(动态字段映射)
        • Dynamic templates(动态模板)
        • Override default template(覆盖默认模板)
    • 3.3. Analysis(分析)
      • 3.3.1.Anatomy of an analyzer(分析器的分析)
      • 3.3.2.Testing analyzers(测试分析器)
      • 3.3.3.Analyzers(分析器)
        • Configuring built-in analyzers(配置内置分析器)
        • Standard Analyzer(标准分析器)
        • Simple Analyzer(简单分析器)
        • Whitespace Analyzer(空格分析器)
        • Stop Analyzer(停止词分词器)
        • Keyword Analyzer(关键词分析器)
        • Pattern Analyzer(模式分析器)
        • Language Analyzers(语言分析器)
        • Fingerprint Analyzer(指纹分析器)
        • Custom Analyzer(自定义分析器)
      • 3.3.4. Tokenizers(分词器)
        • Standard Tokenizer(标准分词器)
        • Letter Tokenizer
        • Lowercase Tokenizer (小写分词器)
        • Whitespace Tokenizerr (空格分词器)
        • UAX URL Email Tokenizer
        • Classic Tokenizer
        • Thai Tokenizer(泰语分词器)
        • NGram Tokenizer
        • Edge NGram Tokenizer
        • Keyword Tokenizer(关键词分词器)
        • Pattern Tokenizer(模式分词器)
        • Path Hierarchy Tokenizer(路径层次分词器)
      • 3.3.5.Token Filters(词语过滤器)
      • 3.3.5.补充1:Token Filters(词语过滤器)
      • 3.3.5.补充2:Token Filters(词语过滤器)
      • 3.3.6.Character Filters(字符过滤器)
        • HTML Strip Character Filter(HTML标签过滤)
        • Mapping Character Filter(字符替换映射)
        • Pattern Replace Character Filter(正则替换字符)
    • 3.4. APIs
      • 3.4.1.索引 APIs (Indices APIs)
        • 创建/删除/获取->索引
        • 启动关闭/缩小/滚动->索引
        • 提交/获取/获取字段->映射
        • 索引->别名/是否存在/类型存在
        • 更新索引/获取->设置(未完成)
        • 分析器、索引模板(未完成)
        • Shadow replica indices 卷影副本索引
        • 索引->统计信息/段
        • 索引->恢复/分片存储
        • 清理缓存/刷新/同步刷新
        • 重新加载/强制合并
      • 3.4.2.文档 APIs (Document APIs)
        • 读写文档(Reading and Writing documents)
        • 索引文档 API
        • 获取/批量获取->文档
        • 删除/根据查询API删除
        • 更新/根据查询API更新
        • Bulk API(批量操作)
        • Reindex API(复制索引)
        • Term Vectors(词条向量)/Multi termvectors API
        • ?refresh
      • 3.4.3.搜索 APIs (Search APIs)
        • Search / URI Search
        • Request Body Search(未完成)
          • Query / From / Size
          • Sort / Source filtering
          • Fields / Script Fields / Doc value Fields
          • Post filter
          • Highlighting
          • Rescoring / Search Type
          • Scroll
          • Preference / Explain
          • Version / Index Boost
          • min_score / Named Queries
          • Inner hits / Search After
          • Field Collapsing 字段折叠
        • Search 模板/Multi Search 模板
        • Search Shards API
        • Suggesters
          • Term suggester
          • Phrase Suggester
          • Completion Suggester
          • Context Suggester
          • 返回suggester的类型
        • Multi Search API
        • Count API
        • Validate API
        • Explain API
        • Profile API
          • Profiling Queries
          • Profiling Aggregations
          • Profiling Considerations
        • Percolator / Field stats API
        • Field Capabilities API
    • 3.5.Query DSL(DSL方式查询)
      • 3.5.1.查询和过滤上下文
      • 3.5.2.Match All 查询
      • 3.5.3.全文搜索(Full Text Search)
        • 匹配查询(Match Query)
        • 短语匹配查询(Match Phrase Query)
        • 短语前缀匹配查询(Match Phrase Prefix Query)
        • 多字段查询(Multi Match Query)
        • 常用术语查询(Common Terms Query)
        • (Query String Query) 未完成
      • 3.5.4.Term级别查询(Term level queries)
        • Term 查询
        • Terms 查询
        • Range 查询(范围查询)
        • Exists 查询(非空值查询)
        • Prefix 查询(前缀查询)
        • Wildcard 查询(通配符查询)
        • Regexp 查询(正则表达式查询)
        • Fuzzy 查询(模糊查询)
        • Type Query(类型查询)
        • Ids Query(ID 查询)
      • 3.5.5.复合查询(Compound queries)
        • Constant Score 查询
        • Bool 查询
        • Dis Max 查询
        • Function Score 查询
        • Boosting 查询
        • Indices 查询
      • 3.5.6.Joining 查询(连接查询)
        • Nested Query(嵌套查询)
        • Has Child Query
        • Has Parent Query
        • Parent Id Query
      • 3.5.7.地理位置查询 (Geo queries)
        • GeoShape Query(地理形状查询)
        • Geo Bounding Box Query(地理边框查询)
        • Geo Distance Query(地理距离查询)
        • Geo Distance Range Query(地理距离范围查询)
        • Geo Polygon Query(地理多边形查询)
      • 3.5.8.专业查询(Specialized queries)
      • 3.5.9.Span 查询
        • Span Term 查询
        • Span Multi Term 查询
        • Span First 查询
        • Span Near 查询
        • Span Or 查询
        • Span Not 查询
        • Span Containing 查询
        • Span Within 查询
        • Span Field Masking 查询
    • 3.6.Aggregations(聚合分析)
      • 3.6.1.量度聚合(Metric Aggregations)
        • 平均值聚合(Avg Aggregation)
        • 基数聚合(Cardinality Aggregation)
        • 扩展统计聚合( Extended Stats Aggregation)
        • 地理边界聚合(Geo Bounds Aggregation)
        • 地理重心聚合(Geo Centroid Aggregation)
        • 最大值聚合(Max Aggregation)
        • 最小值聚合(Min Aggregation)
        • Percentiles Aggregation
        • Percentile Ranks Aggregation
        • Scripted Metric Aggregation
        • Stats Aggregation
        • 总和聚合(Sum Aggregation)
        • Top hits Aggregation
        • Value Count Aggregation
      • 3.6.2.桶聚合(Bucket Aggregations)
        • 邻接矩阵聚合(Adjacency Matrix Aggregation)
        • Children Aggregation
        • 日期直方图聚合(Date Histogram Aggregation)
        • 日期范围聚合(Date Range Aggregation)
        • 多元化的采样器聚集(Diversified Sampler Aggregation)
        • 过滤器聚合(Filter Aggregation)
        • 多过滤器聚合(Filters Aggregation)
        • 地理距离聚合(Geo Distance Aggregation)
        • GeoHash网格聚合(GeoHash grid Aggregation)
        • 全局聚合(Global Aggregation)
        • 直方图聚合(Histogram Aggregation)
        • IP范围聚合(IP Range Aggregation)
        • 丢失字段聚合(Missing Aggregation)
        • 嵌套聚合(Nested Aggregation)
        • 范围聚合(Range Aggregation)
        • Reverse nested Aggregation
        • 采样聚合(Sampler Aggregation)
        • Significant Terms Aggregation
      • 3.6.3.管道聚合(Pipeline Aggregations)
        • 平均值桶聚合( Avg Bucket Aggregation)
        • 导数聚合(Derivative Aggregation)
        • 最大值桶聚合(Max Bucket Aggregation)
        • 最小值桶聚合(Min Bucket Aggregation)
        • 总和桶聚合(Sum Bucket Aggregation)
        • 统计桶聚合(Stats Bucket Aggregation)
        • 扩展信息桶聚合(Extended Stats Bucket Aggregation)
        • 百分数桶聚合(Percentiles Bucket Aggregation)
        • Moving Average Aggregation
        • 累积汇总聚合(Cumulative Sum Aggregation)
        • 桶脚本聚合(Bucket Script Aggregation)
        • 桶选择器聚合(Bucket Selector Aggregation)
        • 串行差异聚合(Serial Differencing Aggregation)
      • 3.6.4.矩阵聚合(Matrix Aggregations)
        • 矩阵统计(Matrix Stats)
      • 3.6.5.缓存频繁聚合(Caching heavy aggregations)
      • 3.6.6.仅返回需要聚合的结果(Returning only aggregation results)
      • 3.6.7.聚合元数据(Aggregation Metadata)
      • 3.6.8.返回聚合的类型(Returning the type of the aggregation)
    • Glossary of terms (词汇表)
    • 未完成的任务
  • 4.基础补充总结
    • 3.2.Mapping
    • 3.3.分析器与定义自己的分析器(Analyzer)
  • 原理
  • 实战
    • 结构化搜索
    • 聚合分析
    • 数据建模
    • 应用场景
  • PHP API
    • 安装与快速入门
    • 配置
    • 实战
  • 资料
  • 笔记
    • 1.x 升级 2.x
Powered by GitBook
On this page
  • Pattern Capture Token Filter(模式匹配词元过滤器)
  • Pattern Replace Token Filter(模式替换词元过滤器)
  • Trim Token Filter(Trim词元过滤器)
  • Limit Token Count Token Filter(限制词元数量过滤器)
  • 示例
  • Hunspell Token Filter(Hunspell 词元过滤器)
  • Common Grams Token Filter(近义词词元过滤器)
  • Normalization Token Filter(标准化词元过滤器)
  • CJK Width Token Filter(CJK宽度过滤器)
  • CJK Bigram Token Filter(CJK Bigram词元过滤器)
  • Delimited Payload Token Filter(Delimited Payload词元分析器)
  • Keep Words Token Filter(保留字过滤器)
  • Keep Types Token Filter(保留指定类型过滤器)
  • 简述
  • 参数
  • 示例
  • Classic Token Filter(经典过滤器)
  • Apostrophe Token Filter(撇号/单引号过滤器)
  • Decimal Digit Token Filter(十进制数字过滤器)
  • Fingerprint Token Filter(指纹过滤器)
  • Minhash Token Filter(Minhash过滤器)

Was this helpful?

  1. 3.基础
  2. 3.3. Analysis(分析)

3.3.5.补充2:Token Filters(词语过滤器)

Previous3.3.5.补充1:Token Filters(词语过滤器)Next3.3.6.Character Filters(字符过滤器)

Last updated 5 years ago

Was this helpful?

Pattern Capture Token Filter(模式匹配词元过滤器)

简述

pattern_capture词元过滤器与pattern 分词器不同,为正则表达式中的每个捕获组发出一个token。

模式不会锚定到字符串的开始和结尾,每个模式可以匹配多次,并且允许重复匹配。

小心病态正则表达式 模式捕获令牌过滤器使用

。 一个严重的正则表达式可能会运行得非常慢,甚至会抛出一个StackOverflowError,并导致其运行的节点突然退出。 阅读更多。

示例-1

举例如下:

正则:

"(([a-z]+)(\d*))"

待匹配文字:

"abc123def456"

匹配结果:

[ abc123, abc, 123, def456, def, 456 ]

如果preserve_original设置为true (默认值),那么它也会发出原始令牌: abc123def456 。

这对于索引文本(如驼峰式代码)特别有用,例如stripHTML ,用户可以在其中搜索"strip html"或"striphtml" :

PUT test
{
   "settings" : {
      "analysis" : {
         "filter" : {
            "code" : {
               "type" : "pattern_capture",
               "preserve_original" : true,
               "patterns" : [
                  "(\\p{Ll}+|\\p{Lu}\\p{Ll}+|\\p{Lu}+)",
                  "(\\d+)"
               ]
            }
         },
         "analyzer" : {
            "code" : {
               "tokenizer" : "pattern",
               "filter" : [ "code", "lowercase" ]
            }
         }
      }
   }
}

当处理如下文本内容时:

import static org.apache.commons.lang.StringEscapeUtils.escapeHtml

结果如下:

[ import, static, org, apache, commons, lang, stringescapeutils, string, escape, utils, escapehtml, escape, html ]

示例-2

别一个例子就是分析邮箱时,如下所示:

PUT test
{
   "settings" : {
      "analysis" : {
         "filter" : {
            "email" : {
               "type" : "pattern_capture",
               "preserve_original" : true,
               "patterns" : [
                  "([^@]+)",
                  "(\\p{L}+)",
                  "(\\d+)",
                  "@(.+)"
               ]
            }
         },
         "analyzer" : {
            "email" : {
               "tokenizer" : "uax_url_email",
               "filter" : [ "email", "lowercase",  "unique" ]
            }
         }
      }
   }
}

当邮箱格式如下时:

john-smith_123@foo-bar.com

最终处理结果将为:

john-smith_123@foo-bar.com, john-smith_123,
john, smith, 123, foo-bar.com, foo, bar, com

需要多种模式以允许重复捕获,但也意味着模式不复杂和易于理解。

注意:所有token都以相同的位置处理,并且具有相同的字符偏移量,因此当与突出显示相结合时,整个原始token将被突出显示,而不仅仅是匹配的子集。

例如,查询上述电子邮件地址"smith",将会突出显示整个原始token:

<em>john-smith_123@foo-bar.com</em>

而非仅高亮smith:

john-<em>smith</em>_123@foo-bar.com

Pattern Replace Token Filter(模式替换词元过滤器)

简述

pattern_replace过滤器可以容易地处理基于正则表达式的字符串替换。使用pattern参数定义正则表达式,并且可以使用replacement参数(支持引用原始文本,如下所述)提供要替换字符串。

小心病态正则表达式 模式捕获令牌过滤器使用

Trim Token Filter(Trim词元过滤器)

简述

trim过滤器将会trim掉token周围的空格。

Limit Token Count Token Filter(限制词元数量过滤器)

简述

限制每个文档和字段索引的token数。

参数

设置

描述

max_token_count

每个文档和字段应该索引的token的最大数量。默认值为1

consume_all_tokens

如果设置为true,尽管已经超过max_token_count设定的值,也会最大限度的处理所有的token。默认为false。

示例

如下所示:

index :
    analysis :
        analyzer :
            myAnalyzer :
                type : custom
                tokenizer : standard
                filter : [lowercase, five_token_limit]
        filter :
            five_token_limit :
                type : limit

Hunspell Token Filter(Hunspell 词元过滤器)

简述

Hunspell过滤器是Hunspell的基础。Hunspell字典将从文件系统上的专用hunspell目录( <path.conf>/hunspell )中<path.conf>/hunspell 。预期每个字典都有自己的目录,以其关联的语言环境(语言)命名。这个字典目录预计会保存一个*.aff和一个或多个*.dic文件(所有这些文件将自动被读取)。例如,假设使用默认的hunspell位置,以下目录布局将定义en_US字典:

- conf
    |-- hunspell
    |    |-- en_US
    |    |    |-- en_US.dic
    |    |    |-- en_US.aff

参数

每个字典都可以进行一个设置:

ignore_case  
    如果为true,字典匹配将不区分大小写(默认为false )

这个设置可以在elasticsearch.yml使用全局elasticsearch.yml

  • indices.analysis.hunspell.dictionary.ignore_case

或指定特定字典:

  • indices.analysis.hunspell.dictionary.en_US.ignore_case

还可以在保存这些设置的settings.yml目录下添加settings.yml文件(这将覆盖在elasticsearch.yml定义的任何其他设置)。

可以通过配置分析设置来使用hunspell过滤器:

{
    "analysis" : {
        "analyzer" : {
            "en" : {
                "tokenizer" : "standard",
                "filter" : [ "lowercase", "en_US" ]
            }
        },
        "filter" : {
            "en_US" : {
                "type" : "hunspell",
                "locale" : "en_US",
                "dedup" : true
            }
        }
    }
}

hunspell过滤器接受四个选项:

locale
    此过滤器的区域设置。 如果这没有设置,则使用lang或者language来代替它们,因此必须设置其中一个。

dictionary
    字典的名称 您的hunspell字典的路径应通过indices.analysis.hunspell.dictionary.location 。

dedup
    如果需要返回单条结果,则需要将其设置为true 。 默认为true 。

longest_only
    如果只返回最长的结果,请将其设置为true 。 默认为false :返回所有可能的结果。

与(基于算法的) snowball stemmers(雪球词干分析器)相反,这是基于词典查找的,因此词干的质量由词典的质量决定。

加载字典

默认情况下,当节点启动时,将为该字典检查默认的Hunspell目录( config/hunspell/ ),并自动加载任何字典。

通过在配置文件indices.analysis.hunspell.dictionary.lazy设置为true ,可以将字典加载实际使用。

参考

Hunspell是一个拼写检查器和形态分析器,专为具有丰富形态和复杂的字复合和字符编码的语言而设计。

Common Grams Token Filter(近义词词元过滤器)

简述

当启用query_mode时,过滤器将删除常用单词和单个术语,后跟通用单词。应在搜索分析器中启用此参数。如,"the quick brown is a fox" 将被过滤成 "the_quick", "quick", "brown_is", "is_a", "a_fox", "fox"。

参数

以下是常用设置:

设置

描述

common_words

要使用的常用词列表。

common_words_path

路径(相对于config位置,或绝对)到常用单词列表。每个单词应该在自己的“行”(用换行符分隔)。该文件必须是UTF-8编码。

ignore_case

如果为真,通用单词匹配将不区分大小写(默认为false )。

query_mode

生成二进制,然后删除常用单词和单个术语,后跟一个通用单词(默认为false )。

注意, common_words或common_words_path字段是必需的。

示例

如下所示:

index :
    analysis :
        analyzer :
            index_grams :
                tokenizer : whitespace
                filter : [common_grams]
            search_grams :
                tokenizer : whitespace
                filter : [common_grams_query]
        filter :
            common_grams :
                type : common_grams
                common_words: [a, an, the]
            common_grams_query :
                type : common_grams
                query_mode: true
                common_words: [a, an, the]

Normalization Token Filter(标准化词元过滤器)

简述

有几个词元过滤器可用于尝试规范某种语言的特殊字符。

阿拉伯

德语

印地语

印度

库尔德语(Sorani)

波斯语

斯堪的纳维亚文

塞尔维亚

not-released-yet[serbian_normalization],

CJK Width Token Filter(CJK宽度过滤器)

简述

cjk_width令牌过滤器归一化CJK宽度差异:

  • 将全宽ASCII变体折叠成等效的基本拉丁语

  • 将片假片变体的半角折叠成相当的假名

CJK Bigram Token Filter(CJK Bigram词元过滤器)

简述

默认情况下,当一个CJK字符没有相邻字符形成一个二进制格式时,它以单格形式输出。如果您总是输出unigrams和bigrams,请将output_unigrams标志设置为true 。这可以用于组合的unigram +二进制格式。

在han , hiragana , katakana和hangul中为字符生成Bigram,但对于具有ignored_scripts参数的特定脚本,可以禁用bigrams。所有非CJK输入都通过未修改。

示例

{
    "index" : {
        "analysis" : {
            "analyzer" : {
                "han_bigrams" : {
                    "tokenizer" : "standard",
                    "filter" : ["han_bigrams_filter"]
                }
            },
            "filter" : {
                "han_bigrams_filter" : {
                    "type" : "cjk_bigram",
                    "ignored_scripts": [
                        "hiragana",
                        "katakana",
                        "hangul"
                    ],
                    "output_unigrams" : true
                }
            }
        }
    }
}

Delimited Payload Token Filter(Delimited Payload词元分析器)

简述

名称命为delimited_payload_filter 。每当发现分隔符时,将标记分成标记和有效载荷。

示例

默认情况下,“1 quick | 2 fox | 3”被分为具有有效负载1和3令牌, quick和fox 。

参数

delimiter: 用于分割令牌的字符。 默认值为| 。

encoding: 有效载荷的类型。 int为整数, float为浮点数和字符的identity 。 默认为float 。

Keep Words Token Filter(保留字过滤器)

简述

当词元过滤器中的type为keep时,表示只保留具有预定义单词集中的文本的token。可以在设置中定义一组单词,或者从包含每行一个单词的文本文件加载。

参数

keep_words

要保留的单词列表

keep_words_path

一个文字文件的路径

keep_words_case

一个布尔值,表示是否小写单词(默认为false )

示例

PUT /keep_words_example
{
    "settings" : {
        "analysis" : {
            "analyzer" : {
                "example_1" : {
                    "tokenizer" : "standard",
                    "filter" : ["standard", "lowercase", "words_till_three"]
                },
                "example_2" : {
                    "tokenizer" : "standard",
                    "filter" : ["standard", "lowercase", "words_in_file"]
                }
            },
            "filter" : {
                "words_till_three" : {
                    "type" : "keep",
                    "keep_words" : [ "one", "two", "three"]
                },
                "words_in_file" : {
                    "type" : "keep",
                    "keep_words_path" : "analysis/example_word_list.txt"
                }
            }
        }
    }
}

Keep Types Token Filter(保留指定类型过滤器)

简述

当type为keep_types时,过滤器将只保留包含在预定义集合中的token。

参数

types

要保留的类型列表

示例

你可以这样设置:

PUT /keep_types_example
{
    "settings" : {
        "analysis" : {
            "analyzer" : {
                "my_analyzer" : {
                    "tokenizer" : "standard",
                    "filter" : ["standard", "lowercase", "extract_numbers"]
                }
            },
            "filter" : {
                "extract_numbers" : {
                    "type" : "keep_types",
                    "types" : [ "<NUM>" ]
                }
            }
        }
    }
}

并用下述文本进行测试:

POST /keep_types_example/_analyze
{
  "analyzer" : "my_analyzer",
  "text" : "this is just 1 a test"
}

返回结果:

{
  "tokens": [
    {
      "token": "1",
      "start_offset": 13,
      "end_offset": 14,
      "type": "<NUM>",
      "position": 3
    }
  ]
}

注意输出中只有<NUM> token(只有数字1,其他文本都被忽略了。

Classic Token Filter(经典过滤器)

简述

这个过滤器从单词的结尾处删除了英文所有权,并且它从首字母缩略词中删除了点。

Apostrophe Token Filter(撇号/单引号过滤器)

简述

apostrophe过滤器将过滤撇号后的所有字符,包括撇号本身。

Decimal Digit Token Filter(十进制数字过滤器)

简述

decimal_digit过滤器将unicode数字转化为0-9。

Fingerprint Token Filter(指纹过滤器)

简述

fingerprint过滤器发出单个token,该token对于指纹身份的文本和/或提供可以被聚类的token是有用的。它通过排序token,重复数据删除,然后将它们连接回单个token来实现。

示例

如文本:["the", "quick", "quick", "brown", "fox", "was", "very", "brown"],将会被转化为单个token: "brown fox quick the very was",注意token是按字母顺序排列的,并且只有一个"quick" 。

参数

设置

描述

separator

默认为空格。

max_output_size

默认为255 。

最大token大小

因为一个字段可能有许多独特的token,所以重要的是设置一个阈值,使得字段不会变得太大。max_output_size设置控制此行为。如果连接的指纹增长大于max_output_size ,则过滤器将退出并且不会发出token(例如,该字段将为空)。

Minhash Token Filter(Minhash过滤器)

简述

min_hash 过滤器将token流中每个token一一哈希,并将生成的哈希值分成buckets,以保持每bucket最低值的散列值。然后将这些哈希值作为token(词元)返回。

参数

设置

描述

hash_count

散列token流的散列数。默认为1 。

bucket_count

将minhash分成的bucket数。默认为512 。

hash_set_size

每bucket要保留的最小数量。默认为1 。

with_rotation

是否将空bucket中的第一个非空bucket的值填充到其循环右边。仅当hash_set_size等于1时才生效。如果bucket_count大于1,则默认为true ,否则为false 。

。 一个严重的正则表达式可能会运行得非常慢,甚至会抛出一个StackOverflowError,并导致其运行的节点突然退出。 阅读更多。

维基百科,

源代码,

开放办公室Hunspell字典,

Mozilla Hunspell字典,

Chromium Hunspell字典,

此过滤器,用于为经常出现的术语生成二进制码。单项仍被索引。当我们不想完全忽略常用术语时,它可以用作“ 的替代方法。如"the quick brown is a fox",将被过滤成 "the", "the_quick", "quick", "brown", "brown_is", "is_a", "a_fox", "fox"。假设“the”,“is”和“a”是常用词。

,

该令牌过滤器可以被视为NFKC / NFKD Unicode归一化的子集。有关完整的规范化支持,请参阅。

cjk_bigram过滤器形成了由或icu_tokenizer生成的CJK术语中的icu_tokenizer(见 )。

classic过滤器对由生成的词元做可选的后处理。

Java正则表达式
关于病态正则表达式和如何避免它们
Java正则表达式
关于病态正则表达式和如何避免它们
http://en.wikipedia.org/wiki/Hunspell
http://hunspell.sourceforge.net/
http://wiki.openoffice.org/wiki/Dictionaries
https://addons.mozilla.org/en-US/firefox/language-tools/
http://src.chromium.org/viewvc/chrome/trunk/deps/third_party/hunspell_dictionaries/
停止令牌过滤器”
analysis-icu插件
standard tokenizer
analysis-icu插件
classic tokenizer
arabic_normalization
german_normalization
hindi_normalization
indic_normalization
sorani_normalization
persian_normalization
scandinavian_normalization
scandinavian_folding