src/Query/Query.php
/**
   * Use this option to return only the sections of the field which contain the matched text.
   * for more details, check https://oss.redislabs.com/redisearch/Highlight/
   *
   * @param array $fields
   * @param int $fragmentCount
   * @param int $fragmentLength
   * @param string $separator
   *
   * @return $this
   */
Use this option to return only the sections of the field which contain the matched text.



@return $this
Use this option to return only the sections of the field which contain the matched text . @return $this
public function summarize( array $fields, int $fragmentCount = 3, int $fragmentLength = 50, string $separator = '...' ) {
    $count = empty($fields) ? 0 : count($fields);
    $field = implode(' ', $fields);
    $this->summarize = "SUMMARIZE FIELDS $count $field FRAGS $fragmentCount LEN $fragmentLength SEPARATOR $separator";
    return $this;
  }
public function summarize ( array $ fields , int $ fragmentCount = 3 , int $ fragmentLength = 50 , string $ separator = '...' ) { $ count = empty ( $ fields ) ? 0 : count ( $ fields ) ; $ field = implode ( ' ' , $ fields ) ; $ this -> summarize = " SUMMARIZE FIELDS  $ count $ field  FRAGS  $ fragmentCount  LEN  $ fragmentLength  SEPARATOR  $ separator " ; return $ this ; }
Use this option to return only the sections of the field which contain the matched text.
Use this option to return only the sections of the field which contain the matched text .