Last active
October 12, 2016 06:11
-
-
Save davidbkemp/b2e3cf6bd661624aeca4311ab819588e to your computer and use it in GitHub Desktop.
Example of how to use Elasticsesarch's Completion Suggesters for address auto-complete
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
{ | |
"suggest": { | |
"output": "5/1-3 Abby Court, West Moonah, Tas 7009", | |
"input": [ | |
"5/1-3 Abby Court, West Moonah, Tas 7009", | |
"Abby Court, West Moonah, Tas 7009", | |
"1-3 Abby Court, West Moonah, Tas 7009", | |
"1 Abby Court, West Moonah, Tas 7009", | |
"3 Abby Court, West Moonah, Tas 7009", | |
"5/1 Abby Court, West Moonah, Tas 7009", | |
"5/3 Abby Court, West Moonah, Tas 7009" | |
] | |
} | |
} |
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
{ | |
"suggestions" : { | |
"text" : "5/1 Ab", | |
"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
{ | |
"nonfuzzy-suggestions": { | |
"text": "5/1 Axb", | |
"completion": { | |
"field": "suggest" | |
} | |
}, | |
"fuzzy-suggestions": { | |
"text": "5/1 Axb", | |
"completion": { | |
"field": "suggest", | |
"fuzzy": {} | |
} | |
} | |
} |
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
{ | |
"address": { | |
"properties": { | |
"suggest" : { | |
"type" : "completion" | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment