Skip to content
Petteri Karttunen edited this page Dec 27, 2018 · 5 revisions

Why Doesn't This Portlet Return the Same Search Results As the Standard Liferay Search Portlet?!

To improve relevancy, the query in this portlet is constructed differently from the standard portlet. For example, by default the query keywords are not matched to categorie which are generally better suitable for secondary facet filtering. You can fully customize the query building and behaviour with JSON configuration in the Control Panel -> System Settings -> GSearch.

Do I Have to Use the Custom Search Adapter?

No but then you loose pretty much all the good stuff improving the relevancy and also the possibility for autocompletion / keyword suggester functionality. Notably, Query String query type, looses most of its configuration options and field level configuration.

How Does the Suggester Work?

The suggester works by storing succesfull search keywords/phrases and offering them as autocompletion options.

Suggestions are bound to the portal instance (companyId) and to the UI language.

Obviously, after installing there are no stored queries, so you have to teach the suggester to make it offer options. Have also a look at the configuration options.

Remember that search phrases are not persisted but are index time only. If you reindex, the options have to be rebuilt again.

Also remember, that the query suggester doesn't currently have any permissioning or filtering support.

Can I Use This With an Embedded Elasticsearch Server?

If you don't want to use the custom Elasticsearch adapter, you can run this also with an embedded server. However not only the custom adapter brings a lot of extra value to this search portlet, but it makes debugging and tweaking easy or in some cases, even possible. Please remember that using embedded server is not supported option in a production environment anyways.

Installation instructions are here.

Clone this wiki locally