Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-132590

Search Portlet generates slow Elasticsearch queries when many languages are configured on a Site

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: Master
    • Fix Version/s: None
    • Component/s: Web Search
    • Labels:
    • Fix Priority:
      3

      Description

      We are talking about Liferay's SearchPortlet.

      We used a module for hooking the jsp's and a module for the custom Java classes.

      A part from the custom code, we're using the same way Liferay did for search, which is by calling the class SearchDisplayContext to do a query towards ES.

      public class SearchPortlet extends MVCPortlet {

      @Override
      public void render(
      RenderRequest renderRequest, RenderResponse renderResponse)
      throws IOException, PortletException

      Unknown macro: { *SearchDisplayContext searchDisplayContext =* *searchDisplayContextFactory.create(* *renderRequest, renderResponse, renderRequest.getPreferences());* renderRequest.setAttribute( WebKeys.PORTLET_DISPLAY_CONTEXT, searchDisplayContext); super.render(renderRequest, renderResponse); }

      ...
      }

       

      The query created inside core module lasts huge time if on a Site many languages are configured.

       

      Is there the possibility of using the search APIs by using only one language for a single query?
      Looking at the source code it seems that Liferay takes by default all the languages ​​set on the site and does not actually allow you to make a targeted query by language.

       

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            stefanogiovanni.somma@nttdata.com Stefano Giovanni Somma
            Participants of an Issue:
            Recent user:
            Brian Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              36 weeks, 1 day ago

                Packages

                Version Package