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

Repeatable decimal fields are not indexable if one is an integer

Details

    Description

      Reproduction steps

      1. Go to Content & Data > Web Content
      2. Select the Structures tab
      3. Create a Structure
        1. Add a Numeric field
        2. In the Basic tab select "Decimal" for "My numeric type is:"
        3. In the Advanced tab, make it "Repeatable"
      4. Create a Web Content using the above structure
        1. Add 1 more instance of the Numeric field
        2. Set the first field to "10"
        3. Set the second field to "1.1"
        4. Click Publish

      Expected behaviour: No Exception in the logs
      Actual behaviour: Exception in the logs:

      2022-06-27 14:33:56.491 ERROR [http-nio-8080-exec-9][Field:190] Unable to extract field value
      java.lang.ArrayStoreException: null
      	at java.util.ArrayList.toArray(ArrayList.java:413) ~[?:1.8.0_292]
      	at com.liferay.dynamic.data.mapping.storage.constants.FieldConstants.getSerializable(FieldConstants.java:191) ~[bundleFile:?]
      	at com.liferay.dynamic.data.mapping.storage.Field.getValue(Field.java:184) ~[bundleFile:?]
      	at com.liferay.dynamic.data.mapping.internal.util.DDMIndexerImpl.extractIndexableAttributes(DDMIndexerImpl.java:372) ~[?:?]
      	at com.liferay.journal.internal.search.spi.model.index.contributor.JournalArticleModelDocumentContributor._extractDDMContent(JournalArticleModelDocumentContributor.java:247) ~[?:?]
      	at com.liferay.journal.internal.search.spi.model.index.contributor.JournalArticleModelDocumentContributor.contribute(JournalArticleModelDocumentContributor.java:89) ~[?:?]
      	at com.liferay.journal.internal.search.spi.model.index.contributor.JournalArticleModelDocumentContributor.contribute(JournalArticleModelDocumentContributor.java:51) ~[?:?]
      	at com.liferay.journal.internal.search.JournalArticleIndexer.doGetDocument(JournalArticleIndexer.java:165) ~[?:?]
      	at com.liferay.journal.internal.search.JournalArticleIndexer.doGetDocument(JournalArticleIndexer.java:76) ~[?:?]
      

      Additionally, searching for "10" on the home page's search widget does not return the newly created web content.

      Attachments

        Activity

          People

            chao.wang Chao Wang
            balazs.safrany-kovalik Balázs Sáfrány-Kovalik
            Kiyoshi Lee Kiyoshi Lee
            Caleb Yun Caleb Yun (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              12 weeks, 1 day ago

              Packages

                Version Package
                7.4.3.34 CE GA34
                Master