Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rateLimitBy, rateLimitWait without Blooodhound #1504

Closed
ghost opened this issue Apr 13, 2016 · 1 comment
Closed

rateLimitBy, rateLimitWait without Blooodhound #1504

ghost opened this issue Apr 13, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Apr 13, 2016

I understand that Bloodhound and Typeahead are decoupled and in my particular case, the database is already providing ranking for the results, so I don't really need Bloodhound. However, I'd like to be able to throttle GET requests when typing. Is there some way to do it without Bloodhound? This is what I have so far:

$('.typeahead').typeahead({
    highlight: true,
    hint: false,
}, {
    name: 'search', 
    display: 'value',
    limit: 10,
    source: function(query, syncResults, asyncResults) {
        $.get('http://localhost:8000/search/' + query, function(data) {

            data =  $.map(data['values'], function(value) {
                return {
                    value: value
                };
            })
            asyncResults(data);
        });
    }
})

Assuming it is not possible to do it without Bloodhound, what is the minimal setup needed to provide rateLimitBy, rateLimitWait without unnecessary additional work.

Thank you

@ghost
Copy link
Author

ghost commented Apr 14, 2016

Sorry. I didn't notice this repository is not active anymore.

@ghost ghost closed this as completed Apr 14, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

0 participants