public function getSnippet($text, $index, $terms, $options = array())
    {
        $results = $this->getSnippets(array($text), $index, $terms, $options);

        if ($results) {
            return $results[0];
        }

        return false;
    }
public function getSnippet($text, $index, $terms, $options = array())
    {
        $results = $this->getSnippets(array($text), $index, $terms, $options);

        if ($results) {
            return $results[0];
        }

        return false;
    }
public function getSnippet ( $ text , $ index , $ terms , $ options = array ( ) ) { $ results = $ this -> getSnippets ( array ( $ text ) , $ index , $ terms , $ options ) ; if ( $ results ) { return $ results [ 0 ] ; } return false ; }
Get snippet for text

@param string $text    Text to process
@param string $index   Search index
@param string $terms   Words for highlight
@param array  $options Generate snippet option

@return string|false
Get snippet for text