Questions tagged [bloodhound]

Bloodhound is the typeahead.js suggestion engine. It's robust, flexible, and offers advanced functionalities such as prefetching, intelligent caching, fast lookups, and backfilling with remote data.

Features

  • Works with hardcoded data
  • Prefetches data on initialization to reduce suggestion latency
  • Uses local storage intelligently to cut down on network requests
  • Backfills suggestions from a remote source
  • Rate-limits and caches network requests to remote sources to lighten the load

See the official documentation here.

280 questions
3
votes
3 answers

Improve query efficiency for repetitive queries

I am writing a node.js application to enable search over a PostgreSQL database. In order to enable twitter type-ahead in the search box, I have to crunch a set of keywords from database to initialize Bloodhound before page loading. This is something…
sqr
  • 365
  • 2
  • 12
  • 29
3
votes
1 answer

How to ignore parts of template for highlighting in Typeahead.js?

I'm using typeahead with bloodhound with a custom template and a Bootstrap css file. My template is as in the first link above looking like this: $(function() { cropsSuggestionEngine.initialize(); $('#select-crop .typeahead').typeahead({ …
user2609980
  • 10,264
  • 15
  • 74
  • 143
3
votes
2 answers

Unable to view all matching results with Typeahead/Bloodhound

I am using Typeahead/Bloodhoud for a company search and the autocomplete section is not showing enough matches. ---------- Search ---------- I should see at least 5 results since the limit is 5. ---------- Ajax Response ---------- Typeahead…
Ben
  • 60,438
  • 111
  • 314
  • 488
3
votes
2 answers

Show full list of suggestions on click with typeahead and bloodhound

I am using Typeahead.js with the bloodhound suggestion engine and would like to make the list appear as soon as the user clicks in the search box. I found this stackoverflow question (Twitter TypeAhead show all results programmatically) which is the…
Bruno
  • 4,685
  • 7
  • 54
  • 105
3
votes
2 answers

Use Meteor collections for Typeahead Bloodhound, preferably without making my own API

I want to build a tags input like the one in StackOverflow. I am trying to use Meteor collections as the remote or prefetch data for Typeahead Bloodhound because I want to eventually use Bootstrap Tokenfield. According to their documentation and…
FullStack
  • 5,902
  • 4
  • 43
  • 77
3
votes
2 answers

How do I list objects for Typeahead.js and/or with the Bloodhound engine?

I'm having a hard time figuring out how to display a list of objects using typeahead with a json file as the source. None of my data is being displayed. I want to list the names, and use the other attributes for other things when…
Vongdarakia
  • 379
  • 1
  • 12
  • 25
3
votes
1 answer

Using typeahead bloodhound to handle searched items which have aliases or synonyms

I am trying to implement something similar to the stackoverflow tag suggestion input field. In the database, I have two tables: one is for tags and another is for tagaliases or tag synonyms (tagSynonyms). When a user types a term, the search engine…
Seme1
  • 133
  • 3
  • 10
3
votes
2 answers

How to catch event when typeahead bloodhound remote returns zero results

I'm using twitter typeahead with bloodhound suggestion engine, everything is working fine. Below is my code snippet // instantiate the bloodhound suggestion engine var searchData = new Bloodhound({ datumTokenizer: function(d) { …
Mahesh.D
  • 1,691
  • 2
  • 23
  • 49
3
votes
1 answer

Why am I getting undefined in my typeahead results?

I am trying to get this typeahead working with an ajax call and I'm close but stuck. Currently, it is returning a list of 5 "undefined" items in the dropdown. I have tried formatting my ajax response both as an array and as json encoded. I have…
Stephen Funk
  • 97
  • 1
  • 5
3
votes
3 answers

Twitter's typeahead-bloodhound: What is the equivalent of "%QUERY" when using ajax.data and POST?

If one uses Bloodhound with GET: // Typeahead personsBloodhound = new Bloodhound({ datumTokenizer: function (person) { return person.name; }, queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url:…
sports
  • 7,851
  • 14
  • 72
  • 129
3
votes
3 answers

twitter typeahead + bloodhound reutilization: how do I show a loading gif for the ajax request?

My bloodhound object is reused by two typeaheads, and each typeahead has a hidden image next to it, being these two images: #loading-1 and #loading-2, galleriesBloodhound = new Bloodhound({ datumTokenizer: function (gallery) { return…
sports
  • 7,851
  • 14
  • 72
  • 129
3
votes
2 answers

Twitter Typeahead updater

Can anyone see what I have done wrong here? I have spent ages looking at a whole variety of typeahead code. Values are returned from the Json call that I can select, but I need to set the Id hidden field. I have tried all sorts in the updater…
TimH
  • 83
  • 1
  • 9
3
votes
2 answers

Typeahead/Bloodhound - Using Jquery Ajax for remote causes only a single server side request

I need to use a jquery ajax setup in Bloodhound's remote property since I have a server side page that takes POST requests only. Everything works, but just once. Any subsequent change to the text in the typeahead input box calls the filter function,…
user3636811
  • 31
  • 1
  • 2
3
votes
3 answers

typeahead - How to use google places api with bootstrap bloodhound

I want to use multiple datasets feature of bloodhound to get results one from local database and other from google places api. I'm able to fetch results from my local database as following, // instantiate the bloodhound suggestion engine var…
Mahesh.D
  • 1,691
  • 2
  • 23
  • 49
3
votes
1 answer

Twitter typeahead.js / Bloodhound (v 0.10.2): How to update the (local) source dynamically

In the below example, how should you update the (local) "source" after a selection was made ? The selected value should be deleted from the "source" (and eventually also be re-added, when necessary) so it can't be selected again. var states =…
TomDogg
  • 3,803
  • 5
  • 33
  • 60