src/QueryBuilder.php
/**
     * A normal term/terms query
     * 
     * It will automatically use term or terms query depending on the type of 
     * $value parameter whether it is an array or not.
     * 
     * @param type $key
     * @param type $value
     * @param type $bool
     * @param type $filter
     * @param array $params
     * @return QueryBuilder|static|self
     */
A normal term/terms query

It will automatically use term or terms query depending on the type of
$value parameter whether it is an array or not.


A normal term / terms query It will automatically use term or terms query depending on the type of $value parameter whether it is an array or not .
public function term($key, $value, $bool = "must", $filter = false, array $params = []) {
        if (is_array($key)) {
            return $this->multiTerm($key, $value, $bool, $filter, $params);
        }
        $tool = "term" . (is_array($value) ? "s" : "");
        $this->addBool([$tool => [$key => (is_array($value) ? $value : ["value" => $value])]], $bool, $filter, $params);
        return $this;
    }
public function term ( $ key , $ value , $ bool = " must " , $ filter = false , array $ params = [ ] ) { if ( is_array ( $ key ) ) { return $ this -> multiTerm ( $ key , $ value , $ bool , $ filter , $ params ) ; } $ tool = " term " . ( is_array ( $ value ) ? " s " : " " ) ; $ this -> addBool ( [ $ tool => [ $ key => ( is_array ( $ value ) ? $ value : [ " value " => $ value ] ) ] ] , $ bool , $ filter , $ params ) ; return $ this ; }
A normal term/terms query
A normal term / terms query