This is for setting up docker-composer to create a env to run Liferay 7.
- Docker 17.06.2-ce >=
- Java8 (Oracle JDK 8 or Open JDK 8)
-
Clone this repository
-
Run
reset.sh
-
Run
up.sh
-
Set the portal to connect on local MySQL instance: database-templates
jdbc.default.username=root jdbc.default.driverClassName=com.mysql.jdbc.Driver jdbc.default.password= jdbc.default.url=jdbc:mysql://localhost/lportal?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&useFastDateParsing=false&useUnicode=true
-
Set the portal to connect on local Elasticseach instance: configuring-elasticsearch-for-liferay.
operationMode="REMOTE" # If running Elasticsearch from a different computer: #transportAddresses="ip.of.elasticsearch.node:9300" # Highly recommended for all non-prodcution usage (e.g., practice, tests, diagnostics): #logExceptionsOnly="false"
You can jump this step and configure the portal on control panel: configuring-the-adapter-in-the-control-panel.
-
(Additional) Enable Felix Gogo Shell telnet connection: liferay-osgi-and-ssh-access.
module.framework.properties.osgi.console=11311
-
(Additional) Disable cache:
javascript.log.enabled=false javascript.fast.load=false theme.css.fast.load=false com.liferay.portal.servlet.filters.minifier.MinifierFilter=false com.liferay.filters.strip.StripFilter=false layout.template.cache.enabled=false browser.launcher.url= combo.check.timestamp=true freemarker.engine.cache.storage=soft:1 freemarker.engine.modification.check.interval=0 openoffice.cache.enabled=false velocity.engine.resource.manager.cache.enabled=false com.liferay.portal.servlet.filters.cache.CacheFilter=false com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true
-
Start Liferay DXP / 7
http://localhost:9200
http://localhost:5601
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 ./elasticsearch/logs
you can also change ./elasticsearch/config/elasticsearch.yml for above settings and run
docker-compose up --build
- 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": "東京都清掃局"
}