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

Search result snippet for Web Content doesn't show search terms for long content - BASED ON LOCALE

Details

    Description

      DESCRIPTION
      The search result snippet is not shifting its place in the resulting article in order to highlight the matching word FOR A GIVEN LOCALE.

      STEPS TO REPRODUCE
      1. Navigate to home site
      2. Create 1 web content article with only the word "hello" in the content.
      3. Create 1 more web content article with a lot of text (250-300 characters), but with "hello" as the last word.
      4. Add web content search portlet to the home page and in the configuration, uncheck " Only show results for web content listed in a Web Content Display portlet. "
      5. Add language portlet to page > click "German" flag
      6. Use web content search to search for "hello"
      7. See results which do not show the highlighted search terms within the snippet.

      EXPECTED RESULTS
      "hello" is shown in search snippet

      ACTUAL RESULTS
      search snippet does not show "hello"

      NOTES:

      • JournalArticleIndexer.java - doGetSummary() is a good starting location for where the change might need to take place
      • The text that is shown in the web content search's snippet (after searching) is the BEGINNING text of each content. This happens probably because getBasicContentSummary() needs to be called inside of JournalArticleIndexer.java's doGetSummary() method (instead of getDDMContentSummary() ).
      • In the code, there is a "Document" object that has many different fields. One of those fields is called "snippet_content_en_US" (when debugging in English / American Flag).
      • When you change to a different language, "snippet_content" appears in this Document object (not "snippet_content_en_US"), which makes the data not grabbable.

      Attachments

        Issue Links

          Activity

            People

              tyler.wong Tyler Wong (Inactive)
              tyler.wong Tyler Wong (Inactive)
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                7 years, 7 weeks, 5 days ago

                Packages

                  Version Package