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

Console errors thrown when using certain characters in the Custom Filter query string

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.2.X, Master
    • Fix Version/s: None
    • Labels:
      None
    • Fix Priority:
      3

      Description

      Steps to reproduce

      1. Navigate to the search page
      2. Add the Custom Filter widget with the following:
        Filter Query Type: Query String
        Occur: Filter
        
      1. Search for "test"
      2. Add "{}" to the Custom Filter field and click Apply

      Expected Result
      Expected no stacktraces

      Actual Result
      Following stracktrace is seen. This can be reproduced with other characters as well, including ":", "[]", "/"

      2019-05-15 00:03:50.683 ERROR [http-nio-8080-exec-1][ElasticsearchIndexSearcher:173] java.lang.RuntimeException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[HoLFaRmRTIaR2PL_vVsgTA][liferay-20101][0]: RemoteTransportException[[HoLFaRm][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: QueryShardException[Failed to parse query [{}]]; nested: ParseException[Cannot parse '{}': Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; nested: ParseException[Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; } [Sanitized]
      java.lang.RuntimeException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[HoLFaRmRTIaR2PL_vVsgTA][liferay-20101][0]: RemoteTransportException[[HoLFaRm][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: QueryShardException[Failed to parse query [{}]]; nested: ParseException[Cannot parse '{}': Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; nested: ParseException[Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; } [Sanitized]
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:293)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:133)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:254)
      	at org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:101)
      	at org.elasticsearch.action.search.InitialSearchPhase.access$100(InitialSearchPhase.java:48)
      	at org.elasticsearch.action.search.InitialSearchPhase$2.lambda$onFailure$1(InitialSearchPhase.java:222)
      	at org.elasticsearch.action.search.InitialSearchPhase.maybeFork(InitialSearchPhase.java:176)
      	at org.elasticsearch.action.search.InitialSearchPhase.access$000(InitialSearchPhase.java:48)
      	at org.elasticsearch.action.search.InitialSearchPhase$2.onFailure(InitialSearchPhase.java:222)
      	at org.elasticsearch.action.search.SearchExecutionStatsCollector.onFailure(SearchExecutionStatsCollector.java:73)
      	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:51)
      	at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:464)
      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1130)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1247)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1221)
      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:66)
      	at org.elasticsearch.action.support.HandledTransportAction$ChannelActionListener.onFailure(HandledTransportAction.java:112)
      	at org.elasticsearch.search.SearchService$2.onFailure(SearchService.java:347)
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:341)
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:335)
      	at org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1082)
      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:723)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      2019-05-15 00:03:50.708 ERROR [http-nio-8080-exec-6][ElasticsearchIndexSearcher:173] java.lang.RuntimeException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[HoLFaRmRTIaR2PL_vVsgTA][liferay-20101][0]: RemoteTransportException[[HoLFaRm][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: QueryShardException[Failed to parse query [{}]]; nested: ParseException[Cannot parse '{}': Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; nested: ParseException[Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; } [Sanitized]
      java.lang.RuntimeException: org.elasticsearch.action.search.SearchPhaseExecutionException: Failed to execute phase [query], all shards failed; shardFailures {[HoLFaRmRTIaR2PL_vVsgTA][liferay-20101][0]: RemoteTransportException[[HoLFaRm][127.0.0.1:9300][indices:data/read/search[phase/query]]]; nested: QueryShardException[Failed to parse query [{}]]; nested: ParseException[Cannot parse '{}': Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; nested: ParseException[Encountered " "}" "} "" at line 1, column 1._Was expecting one of:_    "TO" ..._    <RANGE_QUOTED> ..._    <RANGE_GOOP> ..._    ]; } [Sanitized]
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseFailure(AbstractSearchAsyncAction.java:293)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.executeNextPhase(AbstractSearchAsyncAction.java:133)
      	at org.elasticsearch.action.search.AbstractSearchAsyncAction.onPhaseDone(AbstractSearchAsyncAction.java:254)
      	at org.elasticsearch.action.search.InitialSearchPhase.onShardFailure(InitialSearchPhase.java:101)
      	at org.elasticsearch.action.search.InitialSearchPhase.access$100(InitialSearchPhase.java:48)
      	at org.elasticsearch.action.search.InitialSearchPhase$2.lambda$onFailure$1(InitialSearchPhase.java:222)
      	at org.elasticsearch.action.search.InitialSearchPhase.maybeFork(InitialSearchPhase.java:176)
      	at org.elasticsearch.action.search.InitialSearchPhase.access$000(InitialSearchPhase.java:48)
      	at org.elasticsearch.action.search.InitialSearchPhase$2.onFailure(InitialSearchPhase.java:222)
      	at org.elasticsearch.action.search.SearchExecutionStatsCollector.onFailure(SearchExecutionStatsCollector.java:73)
      	at org.elasticsearch.action.ActionListenerResponseHandler.handleException(ActionListenerResponseHandler.java:51)
      	at org.elasticsearch.action.search.SearchTransportService$ConnectionCountingHandler.handleException(SearchTransportService.java:464)
      	at org.elasticsearch.transport.TransportService$ContextRestoreResponseHandler.handleException(TransportService.java:1130)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.processException(TransportService.java:1247)
      	at org.elasticsearch.transport.TransportService$DirectResponseChannel.sendResponse(TransportService.java:1221)
      	at org.elasticsearch.transport.TaskTransportChannel.sendResponse(TaskTransportChannel.java:66)
      	at org.elasticsearch.action.support.HandledTransportAction$ChannelActionListener.onFailure(HandledTransportAction.java:112)
      	at org.elasticsearch.search.SearchService$2.onFailure(SearchService.java:347)
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:341)
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:335)
      	at org.elasticsearch.search.SearchService$4.doRun(SearchService.java:1082)
      	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingAbstractRunnable.doRun(ThreadContext.java:723)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      	at org.elasticsearch.common.util.concurrent.TimedRunnable.doRun(TimedRunnable.java:41)
      	at org.elasticsearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:37)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Reproduced on:
      Tomcat 9.0.17 + MySQL 5.7
      Portal master GIT ID: b4c0890a995af2912793ee3566ba58125d309ba0

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                support-lep@liferay.com SE Support
                Reporter:
                timothy.pak Timothy Pak
                Participants of an Issue:
                Recent user:
                Olivia Yu
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Days since last comment:
                  9 weeks, 5 days ago

                  Packages

                  Version Package