Hi Everyone
I am implementing custom analyzer using following methods.But iam getting text missing ERROR
In this below 3methods when i try to know whether the analyzer is applied or not by using
GET /sa/_analyze?analyzer=full_name
iam getting
{
"error": "ElasticsearchIllegalArgumentException[text is missing]",
"status": 400
}
METHOD1:
*first creating analyzer in settings and adding that anaylzer to the field in the mapping
POST sa
{
"settings":{
"analysis":{
"analyzer":{
"full_name":{
"filter":[
"lowercase"
],
"type":"custom",
"tokenizer":"standard"
}
}
}
},
"mappings": {
"check":{
"properties": {
"name":{
"type": "string",
"analyzer": "full_name"
}
}
}
}
}
*indexing the data
POST sa/check/1
{
"_id":1,
"name":"BALU67 Guyfhf"
}
METHOD2
*indexing the data
POST sa/check/1
{
"_id":1,
"name":"BALU67 Guyfhf"
}
*Closing the index to change the settings
POST sa/_close
*creating the analyzer in the index settings
PUT sa/_settings
{
"analysis":{
"analyzer":{
"full_name":{
"filter":[
"standard",
"lowercase",
"asciifolding"
],
"type":"custom",
"tokenizer":"standard"
}
}
}
}
*opening the index
POST sa/_open
*Appying the created analyzer in the settings to the mapping
POST sa/check/_mapping?ignore_conflicts=true
{
"check":{
"properties": {
"name":{
"type":"string",
"analyzer":"full_name"
}
}
}
}
METHOD3:
*.IN settings creating the anaylzer
PUT /sa
{
"settings": {
"analysis": {
"analyzer": {
"ful_name": {
"filter":[
"lowercase"
],
"type":"custom",
"tokenizer":"standard"
}
}
}
}
}
*indxing the data
POST sa/check
{
"name":"CHA425 WUTH"
}
*Giving the created analyzer in the mapping
GET /sa/check/_mapping?ignore_conflicts=true
{
"check":{
"properties":{
"name":{
"type":"string",
"analyzer":"ful_name"
}
}
}
}
Now in the above 3methods when i use this GET /sa/_analyze?analyzer=full_name
iam getting "text missing error"
Can anyone please help me out in this.
Thanks