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

Using "like" operator in Field criterion throws an exception

    XMLWordPrintable

Details

    Description

      When trying to search for content with Public API using a Field criterion and the like operator (which is supported by the Field criterion at API level), an exception is thrown:

      Unknown operator.
      500 Internal Server Error - RuntimeException
      
      in /Users/lolautruche/workspace/ezsystems/ezp-next/eZ/Publish/Core/Persistence/Legacy/Content/Search/Gateway/CriterionHandler/Field.php at line 189
      

      Code used is the following:

      $criteria = array(
          new ContentTypeIdentifier( 'test' ),
          new Field( 'title', 'like', 'foo' )
      );
      $query = new Query(
          array(
               'criterion' => new Query\Criterion\LogicalAnd( $criteria )
          )
      );
      $result = $this->getRepository()->getSearchService()->findContent( $query );
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jerome.vieilledent-obsolete@ez.no Jérôme Vieilledent (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 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 - 4 hours
                4h