<commit_before><?php

class Denkmal_Elasticsearch_Type_Song extends CM_Elastica_Type_Abstract {

    const INDEX_NAME = 'song';

    protected $_mapping = array(
        'label' => array('type' => 'string'),
    );

    protected $_indexParams = array(
        'index' => array(
            'number_of_shards'   => 1,
            'number_of_replicas' => 0
        ),
    );

    protected function _getQuery($ids = null, $limit = null) {
        $query = '
            SELECT song.id, song.label
			FROM `denkmal_model_song` song
	    ';

        if (is_array($ids)) {
            $query .= ' WHERE song.id IN (' . implode(',', $ids) . ')';
        }
        if (($limit = (int) $limit) > 0) {
            $query .= ' LIMIT ' . $limit;
        }
        return $query;
    }

    protected function _getDocument(array $data) {<commit_msg>Select all fields from from table in song type<commit_after><?php

class Denkmal_Elasticsearch_Type_Song extends CM_Elastica_Type_Abstract {

    const INDEX_NAME = 'song';

    protected $_mapping = array(
        'label' => array('type' => 'string'),
    );

    protected $_indexParams = array(
        'index' => array(
            'number_of_shards'   => 1,
            'number_of_replicas' => 0
        ),
    );

    protected function _getQuery($ids = null, $limit = null) {
        $query = '
            SELECT `song`.*
			      FROM `denkmal_model_song` `song`
        ';

        if (is_array($ids)) {
            $query .= ' WHERE song.id IN (' . implode(',', $ids) . ')';
        }
        if (($limit = (int) $limit) > 0) {
            $query .= ' LIMIT ' . $limit;
        }
        return $query;
    }

    protected function _getDocument(array $data) {
{'fraction_non_alphanumeric': 0.14335868929198362, 'fraction_numerical': 0.003510825043885313, 'mean_word_length': 1.9482758620689655, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5626801', 'n_tokens_mistral': 566, 'n_tokens_neox': 535, 'n_words': 123}