karmi/retire — pull request #916 by fabn (2013-11-30 17:40:07+00:00)
Title: Full suggest API (did you mean and completion support)

I rebased both #857 and #777 against the current master with feature from both branches.

@fbatista branch based his work on standalone suggest api, while @marc-villanueva added it to the search DSL.

I think that both approaches are valid and needed so I merged them in a single PR.

For instance while doing a search it may be good to send a phrase suggestion request with the search itself in order to show a 'did you mean' warning in search results, while if you're implementing an autocompletion box the standalone API will fit best.

I've also added some integration tests and documentation in tire-dsl.rb document, I hope this will be finally merged and released in (re)tire.

Let me know if there is something wrong or that needs improving.