How do I run this in chrome sense plugin:
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. 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. When I realized the case sensitive issue I reran the query with the lowercase "y" and it worked!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.