<commit_before>var process = require('process')
var elasticsearch = require('elasticsearch')
require('dotenv').config({silent: process.env.NODE_ENV === 'production'})

var client = new elasticsearch.Client({
  // host: 'search-ppsandbox-6atza6pvphfjp73xqg7yhyl5qi.us-east-1.es.amazonaws.com',
  host: 'search-pp-stage-37xn6cdq7tj7ehv5rjrgxgrjhq.us-east-1.es.amazonaws.com',
  connectionClass: require('http-aws-es'),
  amazonES: {
    region: 'us-east-1',
    accessKey: process.env.AWS_ACCESS_KEY_ID,
    secretKey: process.env.AWS_SECRET_ACCESS_KEY
  },
  // log: 'debug'
})

// var client = new elasticsearch.Client({
//   hosts: 'localhost:32769',
// })

module.exports = exports = client<commit_msg>Configure ElasticSearch to use AWS config<commit_after>var process = require('process')
var elasticsearch = require('elasticsearch')
require('dotenv').config({silent: process.env.NODE_ENV === 'production'})
var AWS = require("aws-sdk")

AWS.config.update({
  profile: "pp",
  region: "us-east-1"
});

var client = new elasticsearch.Client({
  host: 'search-pp-stage-37xn6cdq7tj7ehv5rjrgxgrjhq.us-east-1.es.amazonaws.com',
  connectionClass: require('http-aws-es'),
  amazonES: {
    region: 'us-east-1',
    credentials: AWS.config.credentials
  },
  // log: 'debug'
})


module.exports = exports = client
{'fraction_non_alphanumeric': 0.1627196333078686, 'fraction_numerical': 0.02215431627196333, 'mean_word_length': 4.770925110132159, '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': '574113', 'n_tokens_mistral': 486, 'n_tokens_neox': 477, 'n_words': 76}