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

Searches performed within portlets cause exceptions for missing spellCheckWord mapping

    Details

      Description

      Fixed in Liferay Connector to Elasticsearch 6 for DXP 7.0 version 1.0.1 or higher.

      Steps to reproduce:

      1. Create Web Content Article
      2. Search for Web Content Article in the Web Content portlet

      Result: The Web Content shows up, however the following stacktrace occurs

      [2018-03-15T15:47:21,925][DEBUG][o.e.a.s.TransportSearchAction] [hYJexou] [liferay-20097][0], node[hYJexouVS1SGJdNQ8QMMtw], [P], s[STARTED], a[id=biKvo616S1m_HBm3BjBP2A]: Failed to execute [SearchRequest{searchType=QUERY_THEN_FETCH, indices=[liferay-20097], indicesOptions=IndicesOptions[id=38, ignore_unavailable=false, allow_no_indices=true, expand_wildcards_open=true, expand_wildcards_closed=false, allow_aliases_to_multiple_indices=true, forbid_closed_indices=true, ignore_aliases=false], types=[], routing='null', preference='null', requestCache=false, scroll=null, maxConcurrentShardRequests=5, batchedReduceSize=512, preFilterShardSize=128, source={"suggest":{"spellCheckRequest":{"text":"apple","term":{"field":"spellCheckWord_en_US","size":1,"suggest_mode":"MISSING","accuracy":0.5,"sort":"SCORE","string_distance":"INTERNAL","max_edits":2,"max_inspections":5,"max_term_freq":0.01,"prefix_length":1,"min_word_length":4,"min_doc_freq":0.0}}}}}]
      org.elasticsearch.transport.RemoteTransportException: [hYJexou][127.0.0.1:9300][indices:data/read/search[phase/query]]
      Caused by: java.lang.IllegalArgumentException: no mapping found for field [spellCheckWord_en_US]
      	at org.elasticsearch.search.suggest.SuggestionBuilder.populateCommonFields(SuggestionBuilder.java:308) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.suggest.term.TermSuggestionBuilder.build(TermSuggestionBuilder.java:447) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.suggest.SuggestBuilder.build(SuggestBuilder.java:175) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:751) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.createContext(SearchService.java:552) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:528) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:324) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:310) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:306) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:996) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:637) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.1.3.jar:6.1.3]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
      [2018-03-15T15:47:21,951][DEBUG][o.e.a.s.TransportSearchAction] [hYJexou] All shards failed for phase: [query]
      org.elasticsearch.ElasticsearchException$1: no mapping found for field [spellCheckWord_en_US]
      	at org.elasticsearch.ElasticsearchException.guessRootCauses(ElasticsearchException.java:618) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:128) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:243) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:107) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.InitialSearchPhase.access$100(InitialSearchPhase.java:49) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.InitialSearchPhase$2.lambda$onFailure$1(InitialSearchPhase.java:217) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.InitialSearchPhase.maybeFork(InitialSearchPhase.java:171) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.InitialSearchPhase.access$000(InitialSearchPhase.java:49) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.InitialSearchPhase$2.onFailure(InitialSearchPhase.java:217) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.SearchExecutionStatsCollector.onFailure(SearchExecutionStatsCollector.java:73) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:51) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:531) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1056) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1149) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1133) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:66) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.action.search.SearchTransportService$6$1.onFailure(SearchTransportService.java:389) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$2.onFailure(SearchService.java:318) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:312) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:306) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$3.doRun(SearchService.java:996) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:637) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41) [elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37) [elasticsearch-6.1.3.jar:6.1.3]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_111]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_111]
      	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_111]
      Caused by: java.lang.IllegalArgumentException: no mapping found for field [spellCheckWord_en_US]
      	at org.elasticsearch.search.suggest.SuggestionBuilder.populateCommonFields(SuggestionBuilder.java:308) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.suggest.term.TermSuggestionBuilder.build(TermSuggestionBuilder.java:447) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.suggest.SuggestBuilder.build(SuggestBuilder.java:175) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:751) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.createContext(SearchService.java:552) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:528) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:324) ~[elasticsearch-6.1.3.jar:6.1.3]
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:310) ~[elasticsearch-6.1.3.jar:6.1.3]
      	... 9 more

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.7.21 + Elasticsearch 6.2.1
      Portal Master Git SHA: b24e3d366c11005bc09475907ac1f86e2be4bd64
      Portal 7.0.x Dev Branch

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.lee Brian Lee
              Reporter:
              brian.lee Brian Lee
              Participants of an Issue:
              Recent user:
              André Ricardo Barreto de Oliveira
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 35 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.X
                  7.1.0 M2
                  7.1.0 CE GA1
                  7.1.10 DXP GA1