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

Custom attributes added through the ExpandoValue API are not indexed for the entity

    Details

    • Fix Priority:
      3

      Description

      1- Define a new Custom Fields for Web Content:

      • name "wc_custom"
      • type: "Text - Indexed"

      2- Add a new Basic Web Content with some dummy data and also enter some value into the Custom Field

      3- Search for the previously entered value from the Custom Field
      Article shows up

      4- Get the "companyId" and the "articleId" of the article from the DB
      5- Add a new ExpandoValue through our JSON WS UI:

      http://localhost:8080/api/jsonws?contextName=&signature=%2Fexpandovalue%2Fadd-value-6-companyId-className-tableName-columnName-classPK-data

      6- Fill up the form:

          companyId: $companyId,
          className: com.liferay.portlet.journal.model.JournalArticle,
          tableName: CUSTOM_FIELDS,
          classPK: $articleId,
          Data: json
      

      7- Submit
      8- Go back to the WC Admin or browse your index using

      Article doesn't show up when searching for "json" = The corresponding indexed document still contains the old custom value in the index

      It affects all type of assets

      == Technical background
      ExpandoValueLocalService doesn't call reindex after adding or deleting custom values because we reindex the entity (which the given ExpandoValue belongs to) itself during the CRUD operations, so the EVLS doesn't have to deal with such task normally.

        Attachments

          Activity

            People

            Assignee:
            tibor.lipusz Tibor Lipusz
            Reporter:
            tibor.lipusz Tibor Lipusz
            Participants of an Issue:
            Recent user:
            Enterprise Release HU
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved:
              Days since last comment:
              5 years, 44 weeks, 4 days ago

                Packages

                Version Package