Skip to content

Installation

Petteri Karttunen edited this page Oct 10, 2019 · 4 revisions

Installation instructions may slightly vary depending on the Liferay version. Specific instructions are in their respective binaries folder.

Installing the custom Elasticsearch adapter

You can use some features of this application without the custom adapter but it's highly recommended to install it as it extends the features of the standard adapter and has improved index settings and type mappings.

For installing the adapter, find the instructions in the respective binary folder.

Installing the Application

See module descriptions and requirements in their respective folders. For installing all the modules:

Step 1 - Download and Deploy

Download and deploy the Liferay GSearch binaries for your portal version from the binaries folder.

Step 3 - Deploy Portlets

Deploy the GSearch portlet from Widgets menu to a portal page.

Step 4 - Create an Asset Publisher Page

Create a page with friendly URL "/viewasset" on a same site as the search portlet and place an Asset Publisher on it. In configuration, check "Set as the Default Asset Publisher for This Page".

Note: if you don't do this step, you might have some search results but it will break at some point.

That's all.

Configuration

Many features are disabled by default. Check configuration options in Control Panel -> System Settings -> Liferay GSearch. Defaults with examples are provided.

Some modules, like the Open NLP and Learn to Rank related Click Tracking modules have external dependencies. Please see their project module folders for more information.

Troubleshooting

If it doesn't work, check the following:

  • Are you using compatible module versions?
  • Is the failing module requiring the custom ES adapter (see module README)` ' Did you restart the portal after the first custom adapter deployment?
  • If it still doesn't work and you are getting JSON configuration errors in the log, you were probably upgrading the modules and the old configuration is incompatible. Try resetting the default configuration values and restart the affected bundles or easier, the portal.

If you are willing to contribute or have problems or questions, please feel free ping or file a ticket. I'm doing the project almost completely as a hobby, so the installation or configuration instructions are at times minimal. Sorry for that.

Important Note About Permissions

This solution, as it is, relies only on the content specific permissions which are indexed in the Elastisearch index. It doesn't take the role inherited permissions into account.

The standard Liferay search portlet relies on both the indexed permissions and on post permission filtering which happens after search results have been fetched. This approach has historically made features like paging and sorting problematic.

So, is this application secure? Because Liferay permissioning only supports grant and not deny permissions, this application is more restrictive than standard search portlet and doesn't expose anything, users should not be allowed to see. However as it doesn't take the inherited roles and permissions into account, users might not see everything they should see. What this means is, that this application is currently suitable mostly for public websites or for private sites where these restrictions won't matter.

If you want to enhance the provided solution and extend the permissioning support, you can override the default fi.soveltia.liferay.gsearch.core.api.query.filter.PermissionFilterQueryBuilder service implementation with a higher ranking implementation priority. The extension point has a dynamic reference option so that it'd be easily customizable.