original_string: public function getSnippet(array $data, $language)
      {
          $parts = array();
          if (isset($data['title'])) {
              // Repeat title twice to make it more important
              $parts = array($data['title'], $data['title']);
          }
  
          if (isset($data['description'])) {
              $parts[] = strip_tags($data['description']);
          }
  
          $snippet = $this->filterStopwords(implode(' ', $parts), $language);
          $this->hook->attach('search.index.snippet', $data, $language, $snippet);
          return $snippet;
      }
code: public function getSnippet(array $data, $language)
      {
          $parts = array();
          if (isset($data['title'])) {
              // Repeat title twice to make it more important
              $parts = array($data['title'], $data['title']);
          }
  
          if (isset($data['description'])) {
              $parts[] = strip_tags($data['description']);
          }
  
          $snippet = $this->filterStopwords(implode(' ', $parts), $language);
          $this->hook->attach('search.index.snippet', $data, $language, $snippet);
          return $snippet;
      }
code_tokens: public function getSnippet ( array $ data , $ language ) { $ parts = array ( ) ; if ( isset ( $ data [ 'title' ] ) ) { // Repeat title twice to make it more important $ parts = array ( $ data [ 'title' ] , $ data [ 'title' ] ) ; } if ( isset ( $ data [ 'description' ] ) ) { $ parts [ ] = strip_tags ( $ data [ 'description' ] ) ; } $ snippet = $ this -> filterStopwords ( implode ( ' ' , $ parts ) , $ language ) ; $ this -> hook -> attach ( 'search.index.snippet' , $ data , $ language , $ snippet ) ; return $ snippet ; }
docstring: Returns a text string to be saved in the index table
  @param array $data
  @param string $language
  @return string
docstring_tokens: Returns a text string to be saved in the index table