Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-84703 Multi Language Search for WCM
  3. LPS-88225

Return highlighting snippets for all matching translations regardless of display language


    • Type: Technical Task
    • Status: Closed
    • Priority: Minor
    • Resolution: Completed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
    • Sprint:
      Search | S02 Sprint 1, Search | S02 Sprint 3, Search | S02 Sprint 4, Search | S02 Sprint 5, Search | S02 Sprint 6, Search | S02 Sprint 7, Search | S02 Sprint 8, Search | S02 Sprint 9, Search | S02 Sprint 10, Search | S02 Sprint 11, Search | S02 Sprint 12, Search | S02 Sprint 13


      This Story implements logic that allows several languages to be targeted in the same search for Journal Articles; and search engine results must return “multi language snippets” (like `snippet_content_en_US` or `snippet_content_pt_BR`) for all languages potentially matching.

      However, currently we build a highlighting request that targets only one locale:


      Visually, this can be noticed when searching from the Liferay Search Page with results displayed in Document Form. There will be no snippet field for languages other than current display language; so no yellow highlight even if there's a matching word in other translations.

      Breaks tests:



      `org.junit.ComparisonFailure: expected:<...e great for telling [<liferay-hl>time</liferay-hl>]> but was:<...e great for telling [time]>`


      `org.junit.ComparisonFailure: expected:<On clocks and [<liferay-hl><liferay-hl>time</liferay-hl></liferay-hl>]> but was:<On clocks and [time]>`

      Tests break because in `SearchContext` (and its `QueryConfig`) the only locale is BRAZIL, therefore only snippet fields like `snippet_content_pt_BR` are requested from the search engine.

      `HighlighterTranslator` currently takes a list of base names and a single locale; it probably needs to receive a list of fully resolved field names instead.




            • Votes:
              0 Vote for this issue
              0 Start watching this issue


              • Created:
                Days since last comment:
                1 year, 6 weeks, 1 day ago


                Version Package