public function snippet($field, $tag = 'b', $separator = '...', $maxSize = 200, $maxNumber = 1, $fragmenter = self::SNIPPET_NO_FRAGMENTER) {
		if(empty($this->data['snippets'])) {
			$this->data['snippets'] = array();
		}
		$this->data['snippets'][] = array(
			'field' => $field,
			'tag' => $tag,
			'separator' => $separator,
			'maxSize' => $maxSize,
			'maxNumber' => $maxNumber,
			'fragmenter' => $fragmenter,
		);
		return $this;
	}
public function snippet($field, $tag = 'b', $separator = '...', $maxSize = 200, $maxNumber = 1, $fragmenter = self::SNIPPET_NO_FRAGMENTER) {
		if(empty($this->data['snippets'])) {
			$this->data['snippets'] = array();
		}
		$this->data['snippets'][] = array(
			'field' => $field,
			'tag' => $tag,
			'separator' => $separator,
			'maxSize' => $maxSize,
			'maxNumber' => $maxNumber,
			'fragmenter' => $fragmenter,
		);
		return $this;
	}
public function snippet ( $ field , $ tag = 'b' , $ separator = '...' , $ maxSize = 200 , $ maxNumber = 1 , $ fragmenter = self :: SNIPPET_NO_FRAGMENTER ) { if ( empty ( $ this -> data [ 'snippets' ] ) ) { $ this -> data [ 'snippets' ] = array ( ) ; } $ this -> data [ 'snippets' ] [ ] = array ( 'field' => $ field , 'tag' => $ tag , 'separator' => $ separator , 'maxSize' => $ maxSize , 'maxNumber' => $ maxNumber , 'fragmenter' => $ fragmenter , ) ; return $ this ; }
Add one snippet
@return OpenSearchServer\Search\Search
Add one snippet