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

DLFileEntryFileNameSearchTest.testExtensionAloneSubstringMatchesExtensionAndPathFields fails with Elasticsearch 6.8.7 on 7.1.x

    Details

      Description

      Steps to reproduce:

      1. Set up an Elasticsearch 6.8.7 remote server with Portal
      2. Run the integration test com.liferay.document.library.search.test.DLFileEntryFileNameSearchTest.testExtensionAloneSubstringMatchesExtensionAndPathFields

      Result: Test fails with the following:

      org.junit.ComparisonFailure: {"from":0,"size":10000,"query":{"bool":{"must":[{"bool":{"must":[{"bool":{"should":[{"bool":{"must":[{"bool":{"should":[{"match":{"comments":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"comments":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"comments":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"content":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"content":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"content":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"match":{"description":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}}],"should":[{"match_phrase":{"description":{"query":"jp","slop":50,"boost":1.0}}},{"match_phrase":{"description":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"properties":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"properties":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"properties":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"title":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"title":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"title":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"url":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"url":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"url":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"should":[{"wildcard":{"userName":{"wildcard":"*jp*","boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"assetCategoryTitles_en_US":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"assetCategoryTitles_en_US":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"assetCategoryTitles_en_US":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"assetTagNames_en_US":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"assetTagNames_en_US":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"assetTagNames_en_US":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"ddmContent":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"ddmContent":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"ddmContent":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"extension":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"extension":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"extension":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"fileEntryTypeId":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"fileEntryTypeId":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"fileEntryTypeId":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"should":[{"wildcard":{"path":{"wildcard":"*jp*","boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"must":[{"bool":{"should":[{"match":{"content_en_US":{"query":"jp","operator":"OR","prefix_length":0,"max_expansions":50,"fuzzy_transpositions":true,"lenient":false,"auto_generate_synonyms_phrase_query":true,"boost":1.0}}},{"match_phrase_prefix":{"content_en_US":{"query":"jp","slop":0,"max_expansions":50,"boost":1.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"should":[{"match_phrase":{"content_en_US":{"query":"jp","slop":0,"boost":2.0}}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"filter":[{"bool":{"must":[{"bool":{"must":[{"terms":{"groupId":["39919"],"boost":1.0}},{"terms":{"scopeGroupId":["39919"],"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},{"bool":{"should":[{"bool":{"must":[{"term":{"entryClassName":{"value":"com.liferay.document.library.kernel.model.DLFileEntry","boost":1.0}}},{"term":{"hidden":{"value":"false","boost":1.0}}},{"term":{"hidden":{"value":"false","boost":1.0}}},{"terms":{"status":["0"],"boost":1.0}},{"terms":{"status":["0"],"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}}],"adjust_pure_negative":true,"boost":1.0}},"stored_fields":["uid","companyId","entryClassPK","entryClassName","scopeGroupId","groupId","assetTagNames","modified","title","content"],"track_scores":true}->[One.jpg, Two.JPG] expected:<[One.jpg[]]> but was:<[One.jpg[, Two.JPG]]> at org.junit.Assert.assertEquals(Assert.java:115) at com.liferay.portal.search.test.util.DocumentsAssert.assertValuesIgnoreRelevance(DocumentsAssert.java:63) at com.liferay.document.library.search.test.DLFileEntryFileNameSearchTest.assertSearch(DLFileEntryFileNameSearchTest.java:245) at com.liferay.document.library.search.test.DLFileEntryFileNameSearchTest.testExtensionAloneSubstringMatchesExtensionAndPathFields(DLFileEntryFileNameSearchTest.java:108) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$2.evaluate(TestExecutorRunnable.java:234) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.test.rule.LiferayIntegrationTestRule$1$1.evaluate(LiferayIntegrationTestRule.java:154) at com.liferay.portal.kernel.test.rule.BaseTestRule$1.evaluate(BaseTestRule.java:55) at com.liferay.portal.kernel.test.rule.TimeoutTestRule$1.evaluate(TimeoutTestRule.java:89) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable$1.evaluate(TestExecutorRunnable.java:143) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at com.liferay.portal.test.rule.LiferayIntegrationTestRule$1$1.evaluate(LiferayIntegrationTestRule.java:154) at com.liferay.portal.kernel.test.rule.BaseTestRule$2.evaluate(BaseTestRule.java:72) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable._execute(TestExecutorRunnable.java:181) at com.liferay.arquillian.extension.junit.bridge.server.TestExecutorRunnable.run(TestExecutorRunnable.java:95) at java.lang.Thread.run(Thread.java:745)
      

      Reproduced on:
      Portal 7.1.x git commit: 266c731be5ed527b1371e20f779b5f14f141595a

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              joshua.chong Joshua Chong
              Reporter:
              joshua.chong Joshua Chong
              Participants of an Issue:
              Recent user:
              Yunlin "Steven" Sun
              Engineering Assignee:
              Wade Cao
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                48 weeks, 2 days ago
                Development End Date:
                Development Start Date:

                  Packages

                  Version Package
                  7.1.10 DXP FP20
                  7.1.10.5 SP5
                  7.1.X