How to use two custom analyzer for same field?

Here is my mappings. I want use both the analyzer code and point analyzer for the field message but they are not showing any results.Individually both the analyzers are working fine but together they are not giving any ouput . I am using Kibana to see the output after loading logs.
Kindly help me.

PUT /demo1/settings?pretty
{
"settings" : {
"analysis" : {
"filter" : {
"code" : {
"type" : "pattern_capture",
"preserve_original" : true,
"patterns" : [
"(\p{Ll}+|\p{Lu}\p{Ll}+|\p{Lu}+)",
"(\d+)"
]
}
},
"analyzer" : {
"code" : {
"tokenizer" : "pattern",
"filter" : [ "code", "lowercase" ]
},
"point_analyzer": {
"type": "pattern",
"pattern": "\.|\s|\:|\
"
}

     }
  }

},
"mappings": {
"my_type": {
"properties": {
"message": {
"type": "string",
"analyzer": "point_analyzer"},

       "message.keyword": {
          "type": "string",
          
          "analyzer":"code"
       }
    }
  }
}

}

What do you mean by "together"? Can you given an example indexing and search request, along with what you expect to be returned and what is actually returned?

thanks my confusion got resolved :slight_smile:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.