Download the latest release and drop into deploy
under your Liferay server dir.
Add > Widgets > Search Development > Geolocation Bulk Load
You can create up to 1,000 documents.
Control Panel > Configuration > Gogo Shell
(or alternatively, Gogo Shell from the command line)
Confirm this module has been loaded:
lb "Liferay Geolocation Bulk Load"
Confirm the command is available:
help | grep geolocation
Execute the command:
geolocation:load
You can pass a number as a parameter to determine how
many documents will be inserted. If you choose to not pass any number, the
default value will be 10
.
Clone this repository.
Create a Liferay Workspace with the Blade CLI if you don't have one.
Note: the Liferay Workspace should be configured in an empty directory - not under portal-master.
Move this project under modules
in your Liferay Workspace (the one you configured above).
Run deploy.sh
(requires env vars) to build and deploy the bundle into Liferay.
Start Liferay.
If the project doesn't build correctly, or the bundle doesn't start
immediately after deployment, double check module versions in bnd.bnd
,
dependencies versions in build.gradle
,
and versions of same packages deployed in Liferay.
After running the load command, you can check if everything was indexed correctly. Just count the number of rows in the JournalArticle table in the DB and then count the number of documents indexed in the Elasticsearch to see if they match.
Run the following query to count the number of Journal Articles inserted in the database of your choice (syntax may differ depending on the database):
SELECT companyId, count(*) FROM JournalArticle group by companyId;
Run the following query to count the number of Journal Articles indexed in the Elasticsearch server:
curl -XPOST 'http://localhost:9200/_search?pretty' --data \
\
'{
"size": 0,
"aggregations": {
"JournalArticle per companyId": {
"terms": {
"field": "companyId"
}
}
},
"query": {
"term": {
"entryClassName": "com.liferay.journal.model.JournalArticle"
}
}
}'
If you're using elasticsearch-head to run this query, make sure you're using
the POST
method instead of GET
.
https://data.boston.gov/dataset/311-service-requests/resource/2968e2c0-d479-49ba-a884-4ef523ada3c0
https://www.boston.gov/departments/innovation-and-technology/apps#bos-311
https://www.cityofboston.gov/311/
https://data.boston.gov/dataset/311-service-requests