[英]Elasticsearch Analysis
How do I run this in chrome sense plugin: 我如何在Chrome感应插件中运行此代码:
GET /_analyze?analyzer=standard?text='This is a test'
I am getting following error, not sure what is missing: 我收到以下错误,不确定丢失了什么:
{
"error": "ElasticSearchIllegalArgumentException[text is missing]",
"status": 400
}
There's a typo in your request. 您的要求中有错别字。 The second '?'
第二 '?' should be an '&'
应该是“&”
GET /_analyze?analyzer=standard&text='This is a test'
In addition to the answer, for troubleshooting this type of issue and to see what is being analyzed, use the analyze API in Elasticsearch 1x. 除了答案之外,要对此类问题进行故障排除并查看要分析的内容,请使用Elasticsearch 1x中的分析API。 Here is an example:
这是一个例子:
GET dev_data/_analyze?field=MYFIELD_IND&text=Y
{
"tokens": [
{
"token": "y",
"start_offset": 0,
"end_offset": 1,
"type": "<ALPHANUM>",
"position": 1
}
]
}
My problem was I was searching for an uppercase "Y", when it was an analyzed string, which by default is lowercase and my term search couldn't find it. 我的问题是,当它是一个分析字符串时,我正在搜索大写的“ Y”,默认情况下为小写,并且我的术语搜索找不到它。 When I realized the case sensitive issue I reran the query with the lowercase "y" and it worked!
当我意识到区分大小写的问题时,我用小写的“ y”重新运行了查询,它成功了!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.