This is for setting up docker-composer to test Elasticsearch and Kuromoji against Liferay 7 GA4 / DXP de32 (Elasticsearch 2.4). This is oraclejdk8
version. If you are looking for openjdk8
version, please refer openjdk8
branch of this repository.
- Docker 17.06.2-ce >=
- Java8 (Oracle JDK 8 or Open JDK 8)
- Clone this repository
- Change the file permission of
/es/docker-entrypoint.sh
to executable. - Go back to the root folder and run
docker-compose up --build
or justdocker-compose up
- Start Liferay DXP / 7
- Login as an administrator and navigate to Control Panel -> Configuration -> System Setting -> Basic configuration tab -> Elasticsearch
- Change Operation mode to REMOTE and Transport addresses to your IP according to the console log, '''publish_address {127.0.0.1:9300}'''. In this case, the Transport address should be
"127.0.0.1:9300"
- Click save and restart Liferay server
- Loging as an administrator, navigate to Control Panel -> Configuration -> Server Configuration and run reindex.
- Clone this repository
- Go back to the root folder and run
docker-compose up --build
or justdocker-compose up
- Start Liferay DXP / 7
- Login as an administrator and navigate to Control Panel -> Configuration -> System Setting -> Basic configuration tab -> Elasticsearch
- Change Operation mode to REMOTE and Transport addresses to your IP according to the console log, '''publish_address {127.0.0.1:9300}'''. In this case, the Transport address should be
"127.0.0.1:9300"
- Click save and restart Liferay server
- Loging as an administrator, navigate to Control Panel -> Configuration -> Server Configuration and run reindex.
- Open /es/config/userdict_ja.txt
- Modify contents according to the user guide
- Stop services with
docker-compose stop
- Delete folders under
/es/data
- Run
docker rm -f `docker ps -qa`
- Run
docker rmi `docker images | sed -ne '2,$p' -e 's/ */ /g' | awk '{print $1":"$2}'`
- If 4 doesn't work, try
docker rmi $(docker images | awk '/^<none>/ { print $3 }')
under /es/logs
under /es/data
Enable slow query log with low threshold would be the easiest way.
- Navigate to Sense
http://localhost:5601/app/sense
e.g. - Modify query below appropriately.
PUT /[index_name]/_settings
{
"index.search.slowlog.threshold.query.warn": "0s",
"index.search.slowlog.threshold.query.info": "0s",
"index.search.slowlog.threshold.query.debug": "0s",
"index.search.slowlog.threshold.query.trace": "0s",
"index.search.slowlog.threshold.fetch.warn": "0s",
"index.search.slowlog.threshold.fetch.info": "0s",
"index.search.slowlog.threshold.fetch.debug": "0s",
"index.search.slowlog.threshold.fetch.trace": "0s",
"index.indexing.slowlog.threshold.index.warn": "0s",
"index.indexing.slowlog.threshold.index.info": "0s",
"index.indexing.slowlog.threshold.index.debug": "0s",
"index.indexing.slowlog.threshold.index.trace": "0s",
"index.indexing.slowlog.level": "trace",
"index.indexing.slowlog.source": "1000"
}
- Search / index and you'll see log files under ./es/logs
- Navigate to
http://localhost:5601/app/sense
and select server (http://elasticsearch:9200) - Paste query below
GET /[index_name]/_analyze
{
"field": "title_ja_JP",
"text": "東京都清掃局"
}
http://localhost:9200
http://localhost:5601/app/sense
In Sense, for a server, set http://elasticsearch:9200
to access the Elasticsearch server.
http://localhost:9200/_plugin/hq