asm-products/buckets — pull request #50 by davidkaneda (2014-08-11 07:47:33+00:00)
Title: Search

MongoDB search is pretty meh. This branch is the first stab at leveraging Elasticsearch. More about Elasticsearch here: http://www.elasticsearch.org

Experiment adds `query` and `search` params to Entry#findByParams (supported in both templates and REST API). `query` defers to Elasticsearch's "simple query string" (better for filtering/templates), while `search` uses a "fuzzy" query with some simple defaults (better for autocomplete). Ended up using query for the typeahead anyway (adding a * to the end by default). Also adds Entry#fetchWithParams and typeahead.js to frontend, and a quick demo to the dashboard.

Issues:
* Currently setting query or search will override and ignore all other params sent in. If people like this approach, we should port the function altogether to rely on Elasticsearch. (would be pretty straight-forward)