Skip to content

Instantly share code, notes, and snippets.

View drusellers's full-sized avatar

Dru Sellers drusellers

View GitHub Profile
// could be struct?
public class MultiResponse<T, E> {
// could be struct?
public class OkResponse: MultiResponse<T,E> {
public T value;
}
public class ErrResponse: MultiResponse<T,E> {
public E value;
}
@drusellers
drusellers / query.json
Created March 15, 2019 15:50
Type Ahead Blog Post - Final Query
POST /hackers/_search
{
"query":{
"fuzzy": {
"name": "ram"
}
}
}
@drusellers
drusellers / terms.csv
Created March 15, 2019 15:47
Type Ahead Blog Post - After Index
Term Doc Ids
ra 3
ram 3
ramo 3
@drusellers
drusellers / after.csv
Created March 15, 2019 15:46
Type Ahead Blog Post - After
Text Input Terms
Rámon Sánchez ramon, sanchez
@drusellers
drusellers / before.csv
Created March 15, 2019 15:45
Type Ahead Blog Post - Before
Text Input Terms
Rámon Sánchez rámon, sánchez
@drusellers
drusellers / mapping.json
Created March 15, 2019 15:43
Type Ahead Blog Post - International Mapping
{
"mappings": {
"_doc": {
"properties": {
"name" : {
"type" : "text",
"analyzer": "fuzzy_analysis"
},
"handles": {
"type": "text",
@drusellers
drusellers / query.json
Created March 15, 2019 15:41
Type Ahead Blog Post - Query Update
POST /hackers/_search
{
"query":{
"fuzzy": {
"name": "dat"
}
}
}
@drusellers
drusellers / query.json
Created March 15, 2019 15:39
Type Ahead Blog Post -
POST hackers/_search
{
"query":{
"term": {
"name": "da"
}
}
}
@drusellers
drusellers / terms.csv
Created March 15, 2019 15:36
Typeahead Blog Post - Edgegram Terms
Term Doc Ids
da 1
dad 1
dade 1
@drusellers
drusellers / mapping.json
Created March 15, 2019 15:29
Type Ahead Blog Post - Edgegram Updates
{
"mappings": {
"_doc": {
"properties": {
"name" : {
"type" : "text",
"analyzer": "fuzzy_analysis"
},
"handles": {
"type": "text",