This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Developer » Search never gives any results

Search never gives any results

Search never gives any results

Wednesday 09 July 2014 10:03:49 am - 1 reply

Hi guys, I have the following code to perform a search:


 $repository = $this->get( 'ezpublish.api.repository' );

      $text = 'Lysti';
      $query = new Query();
      $criterion1 = new Criterion\FullText($text);
      $criterion2 = new Criterion\ContentTypeIdentifier( 'product_category' );
      $query->criterion = new Criterion\LogicalAnd(
        array( $criterion1, $criterion2 )
      echo "<pre>";
      var_dump($repository->getSearchService()->findContent( $query ));
      echo "</pre>";

But the searchHits field always gives 0, no results found. But I know for sure that this product_category with title Lysti exists. What am I doing wrong?

Thursday 31 July 2014 10:03:10 am

I have the same problem, Criterion\FullText doesn't seem to be working. Any help?

Thank you


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from