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

Suggestion widget offers non valid words as suggestions on Elasticsearch

    Details

      Description

      Master/7.2 is not affected due to API changes introduced by LPS-87915.

      Search suggestion returns strange suggestions, sometimes nonexistent words.

      Steps to reproduce

      1. Place the attached dictionary file to <TOMCAT_HOME>/webapps/ROOT/WEB-INF/classes/spellchecker
      2. set the properties below in portal-ext.properties:
        locales.enabled=de_DE,en_US
        locales=de_DE,en_US
        index.search.spell.checker.dictionary[de_DE]=spellchecker/verben_de_DE.txt
        index.search.spell.checker.supported.locales=en_US,es_ES,de_DE
        
      1. Startup the portal and login as omni-admin
      2. Create a basic web content article in German locale with the following content:
        ächten
        angreifen
        anmarschieren
        

        reason: the above German verbs are present in the dictionary.

      1. Open Configuration of the Suggestions widget on the default search page and enable Display "Did you mean: ..." if the number of search results does not meet the threshold. for it.
      2. Reindex all spell check indexes. Assert in console that verben_de_DE.txt is indexed.
      3. Switch to German language
      4. From Search Bar, search for:
      • ächten -> result: Meinten Sie: acht
      • angreifen -> result: Meinten Sie: angreif
      • anmarschieren -> result: Meinten Sie: anmarschi

      Expected: As described here, we give back the token produced by the language analyzer if no real suggestions come back in the suggest response. Elasticsearch doesn't return real suggest options for any of the above three words, so no suggestions should be displayed. ("anmarschi" is not even a real German word.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joshua.itagaki Joshua Itagaki
              Reporter:
              istvan.sajtos Istvan Sajtos
              Participants of an Issue:
              Recent user:
              Tibor Lipusz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 20 weeks, 1 day ago

                  Packages

                  Version Package
                  7.0.X
                  7.1.10 DXP FP13
                  7.1.X