This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Dubiously created by Adrian Cooney | |
* http://dunxrion.github.io | |
*/ | |
(function(console) { | |
"use strict"; | |
//Bootlegged of imgur.com/memegen | |
var memes = {"10 Guy":"http://i.imgur.com/LaENqOV.jpg","3rd World Success Kid":"http://i.imgur.com/WA5duA1.jpg","90's Problems":"http://i.imgur.com/tL47qtp.jpg","Aaand It's Gone":"http://i.imgur.com/yf12saq.jpg","Actual Advice Mallard":"http://i.imgur.com/WymFmVy.jpg","Advice Dog":"http://i.imgur.com/Qk0VO6D.jpg","Advice God":"http://i.imgur.com/xH2fSFg.jpg","Almost Politically Correct Redneck":"http://i.imgur.com/YqLgINf.jpg","Am I The Only One":"http://i.imgur.com/gS9YL5U.jpg","Ancient Aliens":"http://i.imgur.com/NfCknz0.jpg","Annoyed Picard":"http://i.imgur.com/s9GmfSS.jpg","Annoying Childhood Friend":"http://i.imgur.com/27VCyQw.jpg","Annoying Facebook Girl":"http://i.imgur.com/ccczyGt.jpg","Anti-Joke Chicken (Rooster)":"http://i.imgur.com/KOsW0jh.jpg","Awkward Penguin":"http://i.imgur.com/ez1tQrq.jpg","Back In My Day Grandpa":"http://i.imgur.com/zuJSZp8.jpg"," |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.TemplateNames = { | |
//'application': 'application.hbs', | |
'users': 'users.hbs', | |
'user': 'user.hbs', | |
'groups': 'groups.hbs', | |
'group': 'group.hbs', | |
'graph': 'graph.hbs' | |
}; | |
for(template in App.TemplateNames) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPOST localhost:9200/mtest/dynamics -d '{"field1" : "Words are nice", "field2": "We are here"}' | |
curl -XPOST localhost:9200/mtest/dynamics -d '{"field1" : "this is a sentence", "field2": "We are here"}' | |
curl -XPOST localhost:9200/mtest/dynamics -d '{"field1" : "Word", "field2": "not a match"}' | |
curl -XPOST localhost:9200/mtest/dynamics -d '{"field1" : "Word", "field2": "match"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT localhost:9200/mtest | |
curl -X POST localhost:9200/mtest/dynamics/_mapping -d ' | |
{ | |
"dynamic":{ | |
"dynamic_templates":[ | |
{ | |
"template_1":{ | |
"match":"*", | |
"mapping":{ | |
"type":"multi_field", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT localhost:9200/numbers/zipcode/_mapping -d '{ | |
"zipcode" : { | |
"properties" : { | |
"zipcode" : { "type" : "string" }, | |
"suggest" : { "type" : "completion", | |
"index_analyzer" : "standard", | |
"search_analyzer" : "standard", | |
"payloads" : true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT 'localhost:9200/numbers/zipcode/3?refresh=true' -d '{ | |
"name" : "Blah", | |
"suggest" : { | |
"input": [ "Blah" ], | |
"output": "Blah blah", | |
"payload" : { "area code" : 0 } | |
} | |
}' | |
curl -X POST 'localhost:9200/numbers/_suggest?pretty' -d '{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST 'localhost:9200/numbers/_suggest?pretty' -d '{ | |
"numbers-suggest" : { | |
"text" : "902", | |
"completion" : { | |
"field" : "suggest" | |
} | |
} | |
}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT 'localhost:9200/numbers/zipcode/1?refresh=true' -d '{ | |
"name" : "28269", | |
"suggest" : { | |
"input": [ "28269" ], | |
"output": "Zip Code - 28269", | |
"payload" : { "area code" : 704 } | |
} | |
}' | |
curl -X PUT 'localhost:9200/numbers/zipcode/2?refresh=true' -d '{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X PUT localhost:9200/numbers | |
curl -X PUT localhost:9200/numbers/zipcode/_mapping -d '{ | |
"zipcode" : { | |
"properties" : { | |
"zipcode" : { "type" : "string" }, | |
"suggest" : { "type" : "completion", | |
"index_analyzer" : "simple", | |
"search_analyzer" : "simple", | |
"payloads" : true | |
} |