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
func fieldValueFactorSearch(index, Type, searchTerm, category, animated string) []Result { | |
client, _ := elastic.NewSimpleClient(elastic.SetURL("http://13.232.108.38:8000"), | |
elastic.SetErrorLog(log.New(os.Stderr, "ELASTIC ", log.LstdFlags)), | |
elastic.SetInfoLog(log.New(os.Stdout, "", log.LstdFlags))) | |
ctx := context.Background() | |
var Results []Sticker |
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
func incrementVote(index, Type, id string) bool { | |
client, _ := elastic.NewSimpleClient(elastic.SetURL("http://00.00.00.00:0000"), | |
elastic.SetErrorLog(log.New(os.Stderr, "ELASTIC ", log.LstdFlags)), | |
elastic.SetInfoLog(log.New(os.Stdout, "", log.LstdFlags))) | |
ctx := context.Background() | |
script := elastic.NewScript("ctx._source.votes+=1") |
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
func autocomplete(index, Type, term string) []string { | |
client, _ := elastic.NewSimpleClient(elastic.SetURL("http://00.00.00.00:9200"), | |
elastic.SetErrorLog(log.New(os.Stderr, "ELASTIC ", log.LstdFlags)), | |
elastic.SetInfoLog(log.New(os.Stdout, "", log.LstdFlags))) | |
ctx := context.Background() | |
tagSuggester := elastic.NewCompletionSuggester("sticker-suggest").Fuzziness(0).Text(term).Field("tags").SkipDuplicates(true) | |
searchSource := elastic.NewSearchSource(). |
This file has been truncated, but you can view the full file.
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
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# National Achievement Survey\n", | |
"##### -Notebook by Aditya Krishnan" | |
] | |
}, |