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?
You must be logged in to post messages in this topic!