0

I have dockerized ElasticSearch 1.4.2 and I'm trying to make Polish Stemmer work (https://github.com/elastic/elasticsearch-analysis-stempel). After a few issues with installation I have finally done that, but the ElasticSearch still cannot see the Analyzer when I'm trying to Analyze a single text:

curl -XGET localhost:9200/_cat/plugins?v name component version type url Elsie-Dee analysis-stempel 2.4.1 j

curl -XGET localhost:9200/_analyze?analyzer=polish -d 'medyczne' {"error":"ElasticsearchIllegalArgumentException[failed to find analyzer [polish]]","status":400}

I wanted to test how it works so I believe I do not have to create a mapping to analyze particular text, do I?

I have checked elasticsearch.log and there's nothing about it

Murkee
  • 7
  • 3

1 Answers1

0

I have been playing with polish analyzer not so long time ago. On my machine querying localhost:9200/_plugins give me list of

Richard Rider analysis-stempel   2.4.0 j  
Richard Rider mapper-attachments 2.4.0 j  

You don't need to create index, first you can check how it works by querying _analyze endpoint:

GET /_analyze
{
  "analyzer" : "polish",
  "text" : "polskimi"
}

It returns valid tokens for me ("polski"). BTW There is an official docker image for latest 5.X version. On my local PC (as you can see) I have 2.4.0

luk
  • 105
  • 4
  • Yeah, but I could not install `stempel` for 2.4.0. There were some errors. Also, how did you get `mapper-attachments` ? – Murkee Dec 03 '16 at 12:34
  • From the internet :) I was installing the usual way `bin\plugin install` as far as I remember. What errors do you have? – luk Dec 03 '16 at 12:49
  • I have built fresh ES from Docker 2.4.0, then: ```bin/plugin install analysis-stempel ``` It says it's done. Restarted elasticsearch via `service elasticsearch restart`. After that I've done: ```curl -XGET localhost:9200/_analyze -d '{ "analyzer": "polish", "text": "polskimi"}' ``` And the response is: ```{"error":{"root_cause":[{"type":"remote_transport_exception","reason":"[Mys-Tech][172.17.0.2:9300][indices:admin/analyze[s]]"}],"type":"illegal_argument_exception","reason":"failed to find analyzer [polish]"},"status":400} ``` – Murkee Dec 03 '16 at 16:01
  • Just a thought: Maybe I'm shutting down it incorrectly? I've got compose running in one terminal window, on the second I'm sshing to /bin/bash and then trying `service elasticsearch stop` but even after that I can curl localhost:9200 and stilll got the answer. – Murkee Dec 03 '16 at 16:22
  • @UP: EDIT: I have installed ES on the machine without docker and it helped. So probably that's the issue. Any ideas how to stop and start elasticsearch while using `docker-compose`? Not my area of expertise tho, still learning – Murkee Dec 03 '16 at 16:31
  • Maybe indeed, you were querying not the same instance of ES? Maybe that's issue of many nodes? – luk Dec 04 '16 at 06:18
  • Might be. Anyway when I put `service elasticsearch stop` and `start` into Dockerfile it started to work. So thanks for above! – Murkee Dec 04 '16 at 09:27