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

Cannot delete portal pages when solr plugin is configured

    Details

      Description

      When you have the solr-web plugin configured you cannot delete any portal pages

      The problem is caused because deleting a page triggers a search ordered by SortFactoryUtil.getDefaultSorts() (eg. modified date)

      Modified date is not explicitly mapped in schema.xml so it stores it in a dynamic multivalued field.

      Since you cannot order results on a multivalued field you get the following exception

      Bad Request

      request: http://localhost:8080/solr/select?hl=true&hl.fragsize=80&hl.snippets=3&fl=*,score&q=+portletId:19 +threadId:11037 +companyId:10130&
      rows=0&sort=score desc,modified desc&wt=javabin&version=2
      at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:436)
      at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:245)
      at com.liferay.portal.search.solr.server.BasicAuthSolrServer.request(BasicAuthSolrServer.java:93)
      at org.apache.solr.client.solrj.request.QueryRequest.process(QueryRequest.java:89)
      ... 10 more

      One way to solve it is adding

      <field name="modified" type="text" indexed="true" stored="true" />

      to your schema.xml

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            jelmer Jelmer Kuperus (Inactive)
            Participants of an Issue:
            Recent user:
            Esther Sanz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              9 years, 38 weeks ago

                Packages

                Version Package