gavin lau 2 Years Ago - Edited In order to keep up with the pace of release, I wrote this shell for one click docker deployment, hoping to help the group. HostIp=172.18.0.1 DockerIp=172.18.0.2 LRVersion=7439 ImageVersion=7.4.3.9-ga9 BasePath=lr-$LRVersion DBUser=root DBPwd=2Xib6X5MFJ483r5E ESIp=your-elastic-search-ip DATABASE="lportal"$(date +%y%m%d%H%M) mysql -u$DBUser -p$DBPwd << EOF CREATE DATABASE $DATABASE character set utf8; use mysql; create user "$DATABASE"@"$DockerIp" identified by "$DATABASE@7982"; #mysql8.0 GRANT ALL PRIVILEGES ON $DATABASE.* TO $DATABASE@$DockerIp; # GRANT ALL PRIVILEGES ON *.* TO $DBUser@$DockerIp IDENTIFIED BY $DBPwd WITH GRANT OPTION; flush privileges; EOF mkdir -p $BasePath/{files,scripts,deploy} mkdir -p $BasePath/files/osgi/configs mkdir -p $BasePath/files/tomcat/webapps/ROOT/WEB-INF/classes cd $BasePath/files/ touch portal-setup-wizard.properties cat <<EOF > portal-setup-wizard.properties web.server.http.port=80 web.server.https.port=443 web.server.protocol=https jdbc.default.driverClassName=com.mysql.cj.jdbc.Driver jdbc.default.url=jdbc:mysql://$HostIp/$DATABASE?characterEncoding=UTF-8&dontTrackOpenResources=true&holdResultsOpenOverStatementClose=true&serverTimezone=GMT&useFastDateParsing=false&useUnicode=true jdbc.default.username=$DATABASE jdbc.default.password=$DATABASE@7982 layout.user.public.layouts.power.user.required=true layout.user.private.layouts.power.user.required=true http.header.secure.x.frame.options=false session.timeout.auto.extend=true session.timeout=5 redirect.url.security.mode=domain EOF cat <<EOT >> osgi/configs/com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config operationMode="REMOTE" productionModeEnabled=B"true" networkHostAddresses="http://$ESIp:9200" EOT cat <<EOT >> tomcat/webapps/ROOT/WEB-INF/classes/portal-ext.properties redirect.url.security.mode=domain EOT cd /root docker run -it -p 8080:8080 -p 11311:11311 -v $(pwd)/lr-$LRVersion:/mnt/liferay liferay/portal:$ImageVersion Please sign in to reply. Reply as... Cancel
Daniel Dias 2 Years Ago - Edited It seams that the JournalArticleLocalServiceUtil.search api's has stopped searching inside content. I can only get results when search keys that appear in title or other system fields. If i have my own structure with my own fields, and try to call this api looking for some work it returns a blank list. This has worked ok until Liferay 7.3 at least, only stopped working now. List<JournalArticle> projectList = JournalArticleLocalServiceUtil.search(companyId, groupId, Collections.emptyList(),0, mykeywordsearch, null, ddmStructureKey, null, null, null, null, WorkflowConstants.STATUS_APPROVED, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); It is a bug or a depprecation? If i try to call the headless api with same data in que keyword field it return results. I noticed also a strange behaviour, when i create a new structure, sometimes the search works, but it is completely random. Sometimes it works on the second field, sometime in the last but never in the first A simple test is to create a structure with only 2 text fields (Name and Email for example), I also tried specifying it as searchable keyword or Text. If you run the query I put before, It can search data on the second field with searchable type text or keyword but in the first one it always return an empty list. Please sign in to reply. Reply as... Cancel