<commit_before>/*******************************************************************************
 * Copyright (c) 2011, 2017 Eurotech and/or its affiliates and others
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *  
 * Contributors:
 *     Eurotech - initial API and implementation
 *******************************************************************************/
package org.eclipse.kapua.service.datastore.internal.elasticsearch;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.regex.Pattern;

import org.eclipse.kapua.commons.util.KapuaDateUtils;
import org.eclipse.kapua.model.id.KapuaId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Elasticsearch utility class
 * 
 * @since 1.0.0
 */
public class EsUtils {

    private static final Logger s_logger = LoggerFactory.getLogger(EsUtils.class);

    private static final char SPECIAL_DOT = '.';
    private static final String SPECIAL_DOT_ESC = "$2e";

    private static final char SPECIAL_DOLLAR = '$';
    private static final String SPECIAL_DOLLAR_ESC = "$24";

    public static CharSequence ILLEGAL_CHARS = "\"\\/*?<>|,. ";

    public static final String ES_TYPE_STRING = "string";
    public static final String ES_TYPE_INTEGER = "integer";
    public static final String ES_TYPE_LONG = "long";
    public static final String ES_TYPE_FLOAT = "float";
    public static final String ES_TYPE_DOUBLE = "double";
    public static final String ES_TYPE_DATE = "date";
    public static final String ES_TYPE_BOOL = "boolean";
    public static final String ES_TYPE_BINARY = "binary";

    public static final String ES_TYPE_SHORT_STRING = "str";<commit_msg>minor clean up<commit_after>/*******************************************************************************
 * Copyright (c) 2011, 2017 Eurotech and/or its affiliates and others
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *  
 * Contributors:
 *     Eurotech - initial API and implementation
 *******************************************************************************/
package org.eclipse.kapua.service.datastore.internal.elasticsearch;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.regex.Pattern;

import org.eclipse.kapua.commons.util.KapuaDateUtils;
import org.eclipse.kapua.model.id.KapuaId;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * Elasticsearch utility class
 * 
 * @since 1.0.0
 */
public class EsUtils {

    private static final Logger s_logger = LoggerFactory.getLogger(EsUtils.class);

    private static final char SPECIAL_DOT = '.';
    private static final String SPECIAL_DOT_ESC = "$2e";

    private static final char SPECIAL_DOLLAR = '$';
    private static final String SPECIAL_DOLLAR_ESC = "$24";

    public static final CharSequence ILLEGAL_CHARS = "\"\\/*?<>|,. ";

    public static final String ES_TYPE_STRING = "string";
    public static final String ES_TYPE_INTEGER = "integer";
    public static final String ES_TYPE_LONG = "long";
    public static final String ES_TYPE_FLOAT = "float";
    public static final String ES_TYPE_DOUBLE = "double";
    public static final String ES_TYPE_DATE = "date";
    public static final String ES_TYPE_BOOL = "boolean";
    public static final String ES_TYPE_BINARY = "binary";

    public static final String ES_TYPE_SHORT_STRING = "str";
{'fraction_non_alphanumeric': 0.16662341032961328, 'fraction_numerical': 0.010381520892810797, 'mean_word_length': 4.585507246376811, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5533698', 'n_tokens_mistral': 1093, 'n_tokens_neox': 1033, 'n_words': 324}