<commit_before><?php
/**
 * Term query
 *
 * @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/term_query/
 * @uses Elastica_Query_Abstract
 * @category Xodoa
 * @package Elastica
 * @author <NAME> <<EMAIL>>
 */
class Elastica_Filter_Terms extends Elastica_Filter_Abstract
{
	protected $_terms = array();
	
	public function __construct(array $terms = array()) {
		$this->setTerms($terms);
	}
	
	public function setTerms(array $terms) {
		$this->_terms = $terms;
	}
	
	/**
	 * Adds a term to the term query
	 * 
	 * @param string $key Key to query
	 * @param string|array $value Values(s) for the query. Boost can be set with array
	 */
	public function addTerm($key, $value) {
		$this->_terms = array($key => $value);
	}
	
	public function toArray() {
		$args = $this->_terms;
		
		return array('terms' => $args);
	}
}<commit_msg>Alter the Terms filter to enforce a proper js array for the values<commit_after><?php
/**
 * Term query
 *
 * @link http://www.elasticsearch.com/docs/elasticsearch/rest_api/query_dsl/term_query/
 * @uses Elastica_Query_Abstract
 * @category Xodoa
 * @package Elastica
 * @author <NAME> <<EMAIL>>
 */
class Elastica_Filter_Terms extends Elastica_Filter_Abstract
{
	protected $_terms = array();
	
	public function __construct(array $terms = array()) {
		$this->setTerms($terms);
	}
	
	public function setTerms(array $terms) {
		$this->_terms = $terms;
	}
	
	/**
	 * Adds a term to the term query
	 * 
	 * @param string $key Key to query
	 * @param array $value Values(s) for the query. Boost can be set with array
	 */
	public function addTerm($key, array $value) {
		$this->_terms = array($key => array_values($value));
	}
	
	public function toArray() {
		$args = $this->_terms;
		
		return array('terms' => $args);
	}
}
{'fraction_non_alphanumeric': 0.14164785553047404, 'fraction_numerical': 0.0, 'mean_word_length': 3.8977900552486187, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6933611', 'n_tokens_mistral': 642, 'n_tokens_neox': 580, 'n_words': 161}