Skip to content

Instantly share code, notes, and snippets.

View mishatatinets's full-sized avatar

Misha Tatinets mishatatinets

  • Colorado Springs, CO
View GitHub Profile
@pduey
pduey / 00 Rails autocomplete
Last active December 14, 2020 18:19
sunspot_solr ruby gem with solr autosuggest/autocomplete, JQuery UI autocomplete, and apache HTTP server
Architecture: Rails 3.2, Solr 1.4 with sunspot_solr gem, Apache HTTP server as reverse proxy to
Rails app, Jquery UI
Note: I don't care about the distinction between autocomplete and autosuggest. I am implementing what some
people call autosuggest, and I'm calling it autocomplete.
Given the above existing architecture, I want to add an autocomplete field into my app for a single
attribute on a single model. It needs to be fast and secure (duh). The search target field could have
white space and the search input should allow it, e.g., if I search with "iker's gui" it should return
@ianAndrewClark
ianAndrewClark / gist:1171014
Created August 25, 2011 15:55
location mapping, with settings
{
"mappings": {
"locations": {
"properties": {
"recordId": {
"type": "long"
},
"namePlain": {
"type": "string",
"store": "no",