Skip to content

Instantly share code, notes, and snippets.

View wflanagan's full-sized avatar

William Flanagan wflanagan

View GitHub Profile
{
"cluster_name": "audenti",
"status": "yellow",
"timed_out": false,
"number_of_nodes": 5,
"number_of_data_nodes": 5,
"active_primary_shards": 45,
"active_shards": 70,
"relocating_shards": 0,
"initializing_shards": 9,
[2016-01-13 02:47:30,219][WARN ][monitor.jvm ] [es-10010111] [gc][old][7392808][10845] duration [21.6s], collections [1]/[22.4s], total [21.6s]/[2.1h], memory [26.4gb]->[26gb]/[29.9gb], all_pools {[young] [486.2mb]->[16.5mb]/[532.5mb]}{[survivor] [66.5mb]->[0b]/[66.5mb]}{[old] [25.9gb]->[25.9gb]/[29.3gb]}
class Agent
attr_accessor :field1, :field2, :field3
end
fields = ['field1', 'field2', 'field3']
hsh = {'field1' => "a", 'field2' => "b", 'field3' => 'c' }
ag = Agent.new
fields.each do |field|
site:jeffreyhoguerealtor.com classified to 11 profiles
Original: :jeffreyhoguerealtor jeffreyhoguerealtor //jeffreyhoguerealtor Search Homes for Sale in Reading, PA & Berks County by School District with help from Top Realtor, Jeffrey Hogue. Berks County Real Estate Blog! Reading PA and Berks County's Top Real Estate Agent
**Matches**
0: aboutme:jeffreyhoguerealtor :jeffreyhoguerealtor jeffreyhoguerealtor / me/jeffreyhoguerealtor
1: flickr:jeffreyhoguerealtor :jeffreyhoguerealtor jeffreyhoguerealtor //www people/jeffreyhoguerealtor
2: gravatar:jeffreyhoguerealtor :jeffreyhoguerealtor jeffreyhoguerealtor / jeffreyhoguerealtor
3: google:jeffreyhoguerealtor :jeffreyhoguerealtor jeffreyhoguerealtor //plus u/0/109152337888891099284
4: tumblr:jeffreyhoguerealtor :jeffreyhoguerealtor jeffreyhoguerealtor //jeffreyhoguerealtor
5: site:www.jeffreyhoguerealtor.com :www.jeffreyhoguerealtor www.jeffreyhoguerealtor //www.jeffreyhoguerealtor Search Homes for Sale in Reading, PA & Berks County by School Distr
a = Goal.results(profile).each {|row_of_data| row_of_data }
# how do I modify the "metrics and dimensions" methods without defining a specific class?
@wflanagan
wflanagan / query.txt
Created June 12, 2015 18:09
Trying to query to remove documents with negative keywords in ElastIcSearch
Parse Failure [Failed to parse source [{\"query\":{\"filtered\":{\"query\":{\"bool\":{\"must\":[{\"match_all\":{}}],\"must_not\":[]}},\"filter\":{\"bool\":{\"must\":[{\"term\":{\"project_ids\":1022}},{\"terms\":{\"wordsmaster_id\":[18363,18662,18409,18016,18017,18038,18039,18041,18257,18258,18259,18260,18261,18262,18263,18264,18268,18267,18269,18272,18270,18273,18274,18275,18276,18277,18271,18641,18642,18643,18648,18649,18650,18651,18653,18656,18654,18657,18659,18652,18655,18661,18660,18658]}}],\"should\":[],\"must_not\":[{\"match\":{\"text\":[\"seo\",\"indian\"]}}]}}}},\"size\":10,\"from\":0,\"sort\":[{\"created_at\":\"desc\"}]}]]]; nested: QueryParsingException[[mentions_001] No filter registered for [match]]; }]","status":400}
var Audienti = {
currentUser: function (){
return $('body').data('user-id');
}
};
@wflanagan
wflanagan / error.text
Last active August 29, 2015 14:04
ElasticSearch AR Persistence different data structure examples.rb
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":"MapperParsingException[failed to parse [headers]]; nested: ElasticSearchIllegalArgumentException[unknown property [server]]; ","status":400}
from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/elasticsearch-transport-0.4.11/lib/elasticsearch/transport/transport/base.rb:132:in `__raise_transport_error'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/elasticsearch-transport-0.4.11/lib/elasticsearch/transport/transport/base.rb:227:in `perform_request'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/elasticsearch-transport-0.4.11/lib/elasticsearch/transport/transport/http/faraday.rb:20:in `perform_request'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/elasticsearch-transport-0.4.11/lib/elasticsearch/transport/client.rb:92:in `perform_request'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/gems/elasticsearch-api-0.4.11/lib/elasticsearch/api/actions/index.rb:79:in `index'
from /home/vagrant/.rvm/gems/ruby-1.9.3-p545/bundler/gems/elas
@wflanagan
wflanagan / Elasticsearch_error_log.txt
Last active August 29, 2015 14:01
Problem with dynamic field on a subdocument
# 2014-05-26 12:06:24:323 [400]
#
# {
# "error": "MapperParsingException[failed to parse [profiles.location]]; nested: ElasticSearchIllegalArgumentException[unknown property [city]]; ",
# "status": 400
# }
require 'csv'
require 'hashie'
require 'json'
class Close
attr_accessor :data, :jdata
PATH = "/Users/wflanagan/sites/clean_close_data"
def json_file