Answer the question
In order to leave comments, you need to log in
How to set up ENGLISH morphology in elasticsearch?
Set up elastic. Everything works with Russian morphology, for example, if the text contains the phrase "A Christmas tree was born in the forest", then it finds "forest" on request.
But here in the text the word "wells" is found by the query "wells", but not by the query "well"!
And how to live with it?
Customization:
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": ["lowercase", "russian_morphology", "english_morphology", "my_stopwords"]
}
},
"filter": {
"my_stopwords": {
"type": "stop",
"stopwords": "а,без,более,бы,был,была,были,было,быть,в,вам,вас,весь,во,вот,все,всего,всех,вы,где,да,даже,для,до,его,ее,если,есть,еще,же,за,здесь,и,из,или,им,их,к,как,ко,когда,кто,ли,либо,мне,может,мы,на,надо,наш,не,него,нее,нет,ни,них,но,ну,о,об,однако,он,она,они,оно,от,очень,по,под,при,с,со,так,также,такой,там,те,тем,то,того,тоже,той,только,том,ты,у,уже,хотя,чего,чей,чем,что,чтобы,чье,чья,эта,эти,это,я,a,an,and,are,as,at,be,but,by,for,if,in,into,is,it,no,not,of,on,or,such,that,the,their,then,there,these,they,this,to,was,will,with"
}
}
}
}
}
{
"query" : {
"match_phrase" : {
"content" : "wells"
}
},
"_source": ["_id", "filename", "tags"],
"from": 0,
"size": 100,
"highlight": {
"fields": {
"content": { }
}
}
}
Answer the question
In order to leave comments, you need to log in
well, well, it’s in Africa,
and then only wells
in general are getting more and more complicated, and with the forest too
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question