public function field($fieldName, $fieldValue = '', $fieldBoost = null) {
        if(empty($fieldName)) {
            throw new \InvalidArgumentException('Please provide a fieldname');
        }
        $field = array(
			'name'=> $fieldName,
			'value' => $fieldValue
        );
        if(!empty($fieldBoost)) {
            $field['boost'] = $fieldBoost;
        }
        $this->fields[] = $field;
        return $this;
    }
public function field($fieldName, $fieldValue = '', $fieldBoost = null) {
        if(empty($fieldName)) {
            throw new \InvalidArgumentException('Please provide a fieldname');
        }
        $field = array(
			'name'=> $fieldName,
			'value' => $fieldValue
        );
        if(!empty($fieldBoost)) {
            $field['boost'] = $fieldBoost;
        }
        $this->fields[] = $field;
        return $this;
    }
public function field ( $ fieldName , $ fieldValue = '' , $ fieldBoost = null ) { if ( empty ( $ fieldName ) ) { throw new \ InvalidArgumentException ( 'Please provide a fieldname' ) ; } $ field = array ( 'name' => $ fieldName , 'value' => $ fieldValue ) ; if ( ! empty ( $ fieldBoost ) ) { $ field [ 'boost' ] = $ fieldBoost ; } $ this -> fields [ ] = $ field ; return $ this ; }
Add a 'field' entry for this document
@param String $fieldName
@param String $fieldValue
@param int $fieldBoost
@throws \InvalidArgumentException
Add a field entry for this document