Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-23894

Empty sort_key_string results in failed search with API

    XMLWordPrintable

    Details

      Description

      If you search using the API with the code below, the results will be wrong with missing content objects.
      That will happen if the content attribute has an empty sort_key_string.

      // category_l2 is the class name
      // categories_l3 is a text line attribute name
      
      $criterion = new CriterionLogicalAnd(
                      array(
                          new CriterionSubtree(
                              $this->locationService->loadLocation( 68 )->pathString
                          ),
                          new CriterionContentTypeIdentifier(
                              'category_l2'
                          ),
                          new CriterionField(
                              'categories_l3',
                              CriterionOperator::CONTAINS,
                              'TEXT TO SEARCH'
                          )
                      )
                  );
      
      $query->criterion = $criterion;
      $content = $this->searchService->findSingle( $query->criterion );
      

      Note: a similar issue exists on EZP-22308

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              eduardo.fernandes-obsolete@ez.no Eduardo Fernandes (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m