<commit_before>package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"github.com/olivere/elastic"
	"log"
	"net/http"
	"os"
	"strings"
	"time"
)

const (
	DEFAULT_ELASTICSEARCH_HOST = "http://localhost:9200"
	DEFAULT_INDEX_PREFIX       = "logstash-"
	DEFAULT_DATE_FORMAT        = "2006.01.02"
	DEFAULT_NUM_RESULTS        = 500
)

type fieldName []string

var (
	ec             *elastic.Client
	numResults     *int
	indexPrefix    *string
	stringQuery    = "*"
	jsonFlag       *bool
	fieldSeparator           = " "
	fieldNameFlag  fieldName = []string{"@timestamp", "message"}
)

func init() {
	var err error
	var host string
	host = os.Getenv("ELASTICSEARCH_HOST")
	if host == "" {
		host = DEFAULT_ELASTICSEARCH_HOST
	}
	ec, err = elastic.NewClient(http.DefaultClient, host)<commit_msg>fix version of elastic<commit_after>package main

import (
	"encoding/json"
	"flag"
	"fmt"
	"log"
	"net/http"
	"os"
	"strings"
	"time"

	"gopkg.in/olivere/elastic.v1"
)

const (
	DEFAULT_ELASTICSEARCH_HOST = "http://localhost:9200"
	DEFAULT_INDEX_PREFIX       = "logstash-"
	DEFAULT_DATE_FORMAT        = "2006.01.02"
	DEFAULT_NUM_RESULTS        = 500
)

type fieldName []string

var (
	ec             *elastic.Client
	numResults     *int
	indexPrefix    *string
	stringQuery    = "*"
	jsonFlag       *bool
	fieldSeparator           = " "
	fieldNameFlag  fieldName = []string{"@timestamp", "message"}
)

func init() {
	var err error
	var host string
	host = os.Getenv("ELASTICSEARCH_HOST")
	if host == "" {
		host = DEFAULT_ELASTICSEARCH_HOST
	}
	ec, err = elastic.NewClient(http.DefaultClient, host)
{'fraction_non_alphanumeric': 0.12287334593572778, 'fraction_numerical': 0.019533711405166982, 'mean_word_length': 3.201058201058201, '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': '6828508', 'n_tokens_mistral': 621, 'n_tokens_neox': 587, 'n_words': 116}