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

Custom Facet Portlet configured with non-keyword field crashes all portlets in Search Page

Details

    Description

      Steps to reproduce:

      1. Go to Control Panel > Sytem Settings > Search.
      2. Disable "Log Exceptions Only" under the Elasticsearch 7
      3. Create search page
        • Add Custom Facet, Search Bar, and Search Results portlets
      4. Configure Custom Facet Aggregation Field to title
      5. Perform a search

      Result: IllegalArgumentException occurs and all search portlets are unavailable.

      2018-05-31 18:32:28.754 ERROR [http-nio-8080-exec-2][render_portlet_jsp:77] null
      java.lang.IllegalArgumentException: Fielddata is disabled on text fields by default. Set fielddata=true on [title] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead.
      	at org.elasticsearch.index.mapper.TextFieldMapper$TextFieldType.fielddataBuilder(TextFieldMapper.java:301)
      	at org.elasticsearch.index.fielddata.IndexFieldDataService.getForField(IndexFieldDataService.java:115)
      	at org.elasticsearch.index.query.QueryShardContext.getForField(QueryShardContext.java:165)
      	at org.elasticsearch.search.aggregations.support.ValuesSourceConfig.resolve(ValuesSourceConfig.java:96)
      	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.resolveConfig(ValuesSourceAggregationBuilder.java:294)
      	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.doBuild(ValuesSourceAggregationBuilder.java:287)
      	at org.elasticsearch.search.aggregations.support.ValuesSourceAggregationBuilder.doBuild(ValuesSourceAggregationBuilder.java:36)
      	at org.elasticsearch.search.aggregations.AbstractAggregationBuilder.build(AbstractAggregationBuilder.java:132)
      	at org.elasticsearch.search.aggregations.AggregatorFactories$Builder.build(AggregatorFactories.java:329)
      	at org.elasticsearch.search.SearchService.parseSource(SearchService.java:743)
      	at org.elasticsearch.search.SearchService.createContext(SearchService.java:552)
      	at org.elasticsearch.search.SearchService.createAndPutContext(SearchService.java:528)
      	at org.elasticsearch.search.SearchService.executeQueryPhase(SearchService.java:324)
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:310)
      	at org.elasticsearch.search.SearchService$2.onResponse(SearchService.java:306)

      Reproduced on:
      Tomcat 9.0.6 + MySQL 5.7.22
      Portal Master Git SHA: 82d5f0c7f86cf643ac63b509f9e72e1f9c9a48f9

      Attachments

        Issue Links

          Activity

            People

              brian.lee Brian Lee
              brian.lee Brian Lee
              Kiyoshi Lee Kiyoshi Lee
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                3 years, 44 weeks, 1 day ago

                Packages

                  Version Package
                  7.1.10 DXP FP1
                  7.2.0 GA1