弹性体分析仪 [英] Analyzers in elasticsearch

查看:107
本文介绍了弹性体分析仪的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难理解带有轮胎宝石的弹性搜索分析仪的概念。我实际上是这些搜索概念的新手。有人可以帮助我一些参考文章或解释分析仪实际上是什么以及为什么使用它们?



我看到在弹性搜索中提到的不同分析器,如关键字,标准,简单,雪球。没有分析员的知识,我无法弄清楚我真正需要的东西。

解决方案

让我给你一个简短的答案。



分析器用于索引时间和搜索时间。
它用于创建一个术语索引。



要对一个短语进行索引,可以用单词打破它。
这里是分析器。



它应用了标记器和令牌过滤器。
一个tokenizer可以是一个Whitespace tokenizer。它在每个空格处将一个短语分成标记。
小写标记器将分割每个非字母和小写字母的所有字母。



令牌过滤器用于过滤或转换一些令牌。例如,ASCII折叠过滤器会将ê,é,è等字符转换为e。



分析器是所有这些的混合。



您应阅读分析指南并查看所有不同的选项。



默认情况下,Elasticsearch应用标准分析器。它将删除所有常用的英文单词(和许多其他过滤器)



您还可以使用 Analyze Api 了解其工作原理。非常有用。


I'm having trouble understanding the concept of analyzers in elasticsearch with tire gem. I'm actually a newbie to these search concepts. Can someone here help me with some reference article or explain what actually the analyzers do and why they are used?

I see different analyzers being mentioned at elasticsearch like keyword, standard, simple, snowball. Without the knowledge of analyzers I couldn't make out what actually fits my need.

解决方案

Let me give you a short answer.

An analyzer is used at index Time and at search Time. It's used to create an index of terms.

To index a phrase, it could be useful to break it in words. Here comes the analyzer.

It applies tokenizers and token filters. A tokenizer could be a Whitespace tokenizer. It split a phrase in tokens at each space. A lowercase tokenizer will split a phrase at each non-letter and lowercase all letters.

A token filter is used to filter or convert some tokens. For example, a ASCII folding filter will convert characters like ê, é, è to e.

An analyzer is a mix of all of that.

You should read Analysis guide and look at the right all different options you have.

By default, Elasticsearch applies the standard analyzer. It will remove all common english words (and many other filters)

You can also use the Analyze Api to understand how it works. Very useful.

这篇关于弹性体分析仪的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆