HOw set lemmatization in ES.Like id i search for "update" it should be searching for "updated" and "updating" too


(poonam) #1

HOw set lemmatization in ES.Like id i search for "update" it should be searching for "updated" and "updating" too.

PUT /kbs
{
"index":
{
"analysis": {

   "filter": {
              "de_stop_filter": {
  "type": "stop",
  "stopwords": ["_german_"]
},
"de_stem_filter": {
  "type": "stemmer",
  "name": "minimal_german"
},
"en_stop_filter": {
  "type": "stop",
  "stopwords": ["_english_"]
},
"en_stem_filter": {
  "type": "stemmer",
  "name": "minimal_english"
}
             },
   "analyzer":
   {
     

     "de_analyzer": {
  "type": "custom",
  "filter": [ "de_stop_filter", "de_stem_filter"],
  "tokenizer": "standard"
},

"en_analyzer": {
  "type": "custom",
  "filter": [ "en_stop_filter", "en_stem_filter"],
  "tokenizer": "standard"
}

  } 
 }

}
}

get /kbs
PUT /kbs/orders/_mapping
{

    "search_analyzer" : "standard", 
    "properties" : {
       
        "solid" :  {"type":"integer" },
        "title": {"type": "string"},
        "AffectedReleases" : {
            "type" : "string" }

        
        
    }        

}

I used like trhis ,but it does not work


(Colin Goodheart-Smithe) #2

You need to set the analyzer in you mappings for the fields you want to use your custom analyzers. see here for more information: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-core-types.html#string


(system) #3