aparo / opensearch-analysis-ik

The IK Analysis plugin integrates Lucene IK analyzer into OpenSearch, support customized dictionary. Port of https://github.com/medcl/elasticsearch-analysis-ik
Apache License 2.0
40 stars 14 forks source link

Config & dict path incorrect and version unspecified in version 2.11.0 with Docker #31

Open lpwm opened 6 months ago

lpwm commented 6 months ago

I tried to install this plugin using Docker per document https://opensearch.org/docs/latest/install-and-configure/install-opensearch/docker/

COPY ./opensearch-analysis-ik.zip /tmp/ RUN /usr/share/opensearch/bin/opensearch-plugin install file:/tmp/opensearch-analysis-ik.zip


- Build image and start container for testing.
```bash
docker build -t opensearch-with-ik:2.11.0 .
docker run --name opensearch-with-ik-test --rm -d -p 9200:9200 -p 9600:9600 -e "discovery.type=single-node" opensearch-with-ik:2.11.0

COPY ./opensearch-analysis-ik.zip /tmp/ RUN /usr/share/opensearch/bin/opensearch-plugin install file:/tmp/opensearch-analysis-ik.zip

Make a symbol link to fix the path issue

RUN ln -s /usr/share/opensearch/config/opensearch-analysis-ik /usr/share/opensearch/plugins/opensearch-analysis-ik/config


- Rebuild and start container the errors are gone. I can see the IK plugin is loaded, but version is unspecified still.
```bash
curl -X GET https://localhost:9200/_cat/plugins?v -ku "admin:admin"

name         component                            version
df8dea9d22fc opensearch-analysis-ik               unspecified

Have no idea if there're bugs or anything I missed. Please kindly guide, thanks!

libxj commented 4 months ago

I hava the same problem. opensearch1 opensearch-analysis-ik unspecified