Elasticsearch - 4가지 내장형 분석기
3441 단어 elasticsearch분사기es
Built-in Analyzers
However, Elasticsearch also ships with prepackaged analyzers that you can use directly. We list the most important ones next and, to demonstrate the difference in behavior, we show what terms each would produce from this string:
"Set the shape to semi-transparent by calling set_trans(5)"
Standard analyzer
The standard analyzer is the default analyzer that Elasticsearch uses. It is the best general choice for analyzing text that may be in any language. It splits the text on word boundaries, as defined by theUnicode Consortium, and removes most punctuation. Finally, it lowercases all terms. It would produce
set, the, shape, to, semi, transparent, by, calling, set_trans, 5
Simple analyzer
The simple analyzer splits the text on anything that isn’t a letter, and lowercases the terms. It would produce
set, the, shape, to, semi, transparent, by, calling, set, trans
Whitespace analyzer
The whitespace analyzer splits the text on whitespace. It doesn’t lowercase. It would produce
Set, the, shape, to, semi-transparent, by, calling, set_trans(5)
Language analyzers
Language-specific analyzers are available for many languages. They are able to take the peculiarities of the specified language into account. For instance, the
english
analyzer comes with a set of Englishstopwords (common words like and
or the
that don’t have much impact on relevance), which it removes. This analyzer also is able to stem English words because it understands the rules of English grammar. The
english
analyzer would produce the following: set, shape, semi, transpar, call, set_tran, 5
Note how
transparent
, calling
, and set_trans
have been stemmed to their root form. 4가지 분사기는 각자의 특징을 가지고 실제 조회에 따라 적합한 분사기를 지정해야 한다. 그렇지 않으면 예상치 못한 조회 결과가 나올 수 있다.필드에 분사기를 지정해야 할 때mapping을 사용할 수 있습니다.
Specifying Analyzersedit
When Elasticsearch detects a new string field in your documents, it automatically configures it as a full-text
string
field and analyzes it with the standard
analyzer. You don’t always want this. Perhaps you want to apply a different analyzer that suits the language your data is in. And sometimes you want a string field to be just a string field—to index the exact value that you pass in, without any analysis, such as a string user ID or an internal status field or tag.
To achieve this, we have to configure these fields manually by specifying the mapping.공식 문서:https://www.elastic.co/guide/en/elasticsearch/guide/current/analysis-intro.html
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
kafka connect e elasticsearch를 관찰할 수 있습니다.No menu lateral do dashboard tem a opção de connectors onde ele mostra todos os clusters do kafka connect conectados atu...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.