public function createProductFilterByText( $input, $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
	{
		$langid = $this->_getContext()->getLocale()->getLanguageId();
		$search = $this->createProductFilterDefault( $sort, $direction, $start, $size, $listtype );
		$expr = array( $search->compare( '>', $search->createFunction( 'catalog.index.text.relevance', array( $listtype, $langid, $input ) ), 0 ) );

		// we don't need to sort by 'sort:catalog.index.text.relevance' because it's a boolean match (relevance is either 0 or 1)

		$expr[] = $search->getConditions();
		$search->setConditions( $search->combine( '&&', $expr ) );

		return $search;
	}
public function createProductFilterByText( $input, $sort = null, $direction = '+', $start = 0, $size = 100, $listtype = 'default' )
	{
		$langid = $this->_getContext()->getLocale()->getLanguageId();
		$search = $this->createProductFilterDefault( $sort, $direction, $start, $size, $listtype );
		$expr = array( $search->compare( '>', $search->createFunction( 'catalog.index.text.relevance', array( $listtype, $langid, $input ) ), 0 ) );

		// we don't need to sort by 'sort:catalog.index.text.relevance' because it's a boolean match (relevance is either 0 or 1)

		$expr[] = $search->getConditions();
		$search->setConditions( $search->combine( '&&', $expr ) );

		return $search;
	}
public function createProductFilterByText ( $ input , $ sort = null , $ direction = '+' , $ start = 0 , $ size = 100 , $ listtype = 'default' ) { $ langid = $ this -> _getContext ( ) -> getLocale ( ) -> getLanguageId ( ) ; $ search = $ this -> createProductFilterDefault ( $ sort , $ direction , $ start , $ size , $ listtype ) ; $ expr = array ( $ search -> compare ( '>' , $ search -> createFunction ( 'catalog.index.text.relevance' , array ( $ listtype , $ langid , $ input ) ) , 0 ) ) ; // we don't need to sort by 'sort:catalog.index.text.relevance' because it's a boolean match (relevance is either 0 or 1) $ expr [ ] = $ search -> getConditions ( ) ; $ search -> setConditions ( $ search -> combine ( '&&' , $ expr ) ) ; return $ search ; }
Returns product filter for the given search string.

@param string $input Search string entered by the user
@param string|null $sort Sortation of the product list like "name", "price" and "relevance", null for no sortation
@param string $direction Sort direction of the product list ("+", "-")
@param integer $start Position in the list of found products where to begin retrieving the items
@param integer $size Number of products that should be returned
@param string $listtype List type of the text associated to the product, usually "default"
@return MW_Common_Criteria_Interface Criteria object containing the conditions for searching
Returns product filter for the given search string .