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

Make string representation of com.liferay.portal.kernel.search.Query classes more informative

    Details

      Description

      The string representation of queries (i.e. instances of com.liferay.portal.kernel.search.Query is not very helpful. For example, if one puts a breakpoint at line 233 from com.liferay.portal.kernel.search.FacetedSearcher and then sees the representation of the fullQuery variable, she will see something like this:

      [{MUST(com.liferay.portal.kernel.search.generic.BooleanQueryImpl@10bff65)}]
      

      It would be better to see something like this:

      {MUST({SHOULD(assetCategoryTitles~=*foo*)}{SHOULD(assetCateg
      oryTitles_en_US~=*foo*)}{SHOULD(assetTagNames=foo)}{SHOULD(a
      ssetCategoryTitles~=*foo*)}{SHOULD(assetTagNames~=*foo*)}{SH
      OULD(match(comments, foo))}{SHOULD(match(content, foo))}{SHO
      ULD(match(description, foo))}{SHOULD(match(properties, foo))
      }{SHOULD(match(title, foo))}{SHOULD(match(url, foo))}{SHOULD
      (userName~=*foo*)}{SHOULD(userName~=*foo*)}{SHOULD(match(ddm
      Content, foo))}{SHOULD(match(articleId, foo))}{SHOULD(match(
      classPK, foo))}{SHOULD(match(content_en_US, foo))}{SHOULD(ma
      tch(description_en_US, foo))}{SHOULD(match(entryClassPK, foo
      ))}{SHOULD(match(title_en_US, foo))}{SHOULD(match(type, foo)
      )}{SHOULD(userName~=*foo*)}{SHOULD(match(city, foo))}{SHOULD
      (match(country, foo))}{SHOULD(emailAddress~=*foo*)}{SHOULD(f
      irstName~=*foo*)}{SHOULD(match(fullName, foo))}{SHOULD(lastN
      ame~=*foo*)}{SHOULD(middleName~=*foo*)}{SHOULD(match(region,
       foo))}{SHOULD(screenName~=*foo*)}{SHOULD(match(street, foo)
      )}{SHOULD(match(zip, foo))}{SHOULD(match(ddmContent, foo))}{
      SHOULD(match(extension, foo))}{SHOULD(match(fileEntryTypeId,
       foo))}{SHOULD(path~=*foo*)})}
      

      (The example above is compacted.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              linda.sui Linda Sui
              Reporter:
              adam.brandizzi Adam Brandizzi
              Participants of an Issue:
              Recent user:
              Csaba Turcsan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 9 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 DXP FP10
                  7.0.0 DXP SP2
                  7.0.3 CE GA4
                  Master