<commit_before>var Query = function () {
    'use strict';
    var queryExpressions = [];

    var regexTerm = /([\w:!\*]+)/g;
    var regexNonTerm = /[^\w:!\*]+/g;

    var glue = function (term, type, field) {
        var rv = '';

        switch (type) {
        case enumGlueTypes.or:
            rv += term.replace(regexTerm, field + ':$1');
            rv = rv.replace(regexNonTerm, ' OR ');
            break;
        case enumGlueTypes.and:
            rv += term.replace(regexTerm, field + ':$1');
            rv = rv.replace(regexNonTerm, ' AND ');
            break;
        case enumGlueTypes.phrase:
            rv += field + ':"' + term + '"';<commit_msg>allow all special chars listed in #29<commit_after>var Query = function () {
    'use strict';
    var queryExpressions = [];

    var regexTerm    = /([\w\+\-&\|!\(\){}\[\]\^"~\*\?:\\]+)/g;
    var regexNonTerm = /[^\w\+\-&\|!\(\){}\[\]\^"~\*\?:\\]+/g;

    var glue = function (term, type, field) {
        var rv = '';

        switch (type) {
        case enumGlueTypes.or:
            rv += term.replace(regexTerm, field + ':$1');
            rv = rv.replace(regexNonTerm, ' OR ');
            break;
        case enumGlueTypes.and:
            rv += term.replace(regexTerm, field + ':$1');
            rv = rv.replace(regexNonTerm, ' AND ');
            break;
        case enumGlueTypes.phrase:
            rv += field + ':"' + term + '"';
{'fraction_non_alphanumeric': 0.19858657243816255, 'fraction_numerical': 0.004240282685512367, 'mean_word_length': 1.7874015748031495, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '7207366', 'n_tokens_mistral': 467, 'n_tokens_neox': 455, 'n_words': 102}