同步操作将从 Hutool/elasticsearch-definitive-guide-cn 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
While the language analyzers can be used out of the box without any configuration, most of them do allow you to control aspects of their behaviour, specifically:
Imagine, for instance, that users searching for the World Health
Organization'' are instead getting results for
organ health''. The reason
for this confusion is that both organ'' and
organization'' are stemmed to
the same root word: organ
. Often this isn’t a problem, but in this
particular collection of documents this leads to confusing results. We would
like to prevent the words organization
and organizations
from being
stemmed.
The default list of stopwords used in English are:
a, an, and, are, as, at, be, but, by, for, if, in, into, is, it, no, not, of, on, or, such, that, the, their, then, there, these, they, this, to, was, will, with
The unusual thing about no
and not
is that they invert the meaning of the
words that follow them. Perhaps we decide that these two words are important
and that we shouldn’t treat them as stopwords.
In order to customize the behaviour of the english
analyzer, we need to
create a custom analyzer which uses the english
analyzer as its base, but
adds some configuration:
PUT /my_index
{
"settings": {
"analysis": {
"analyzer": {
"my_english": {
"type": "english",
"stem_exclusion": [ "organization", "organizations" ], (1)
"stopwords": [ (2)
"a", "an", "and", "are", "as", "at", "be", "but", "by", "for",
"if", "in", "into", "is", "it", "of", "on", "or", "such", "that",
"the", "their", "then", "there", "these", "they", "this", "to",
"was", "will", "with"
]
}
}
}
}
}
GET /my_index/_analyze?analyzer=my_english (3)
The World Health Organization does not sell organs.
Prevents organization
and organizations
from being stemmed.
Specifies a custom list of stopwords.
Emits tokens world
, health
, organization
, doe
, not
, sell
, organ
.
We will discuss stemming and stopwords in much more detail in [stemming] and [stopwords] respectively.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。