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
4
votes
1 answer

How to use typeahead wildcard

I'm trying to use typeahead for the first time. I would like to update the url parameters based on the user input. The wild card is not being translated and the value "QUERY" is being sent to the remote server. Any help would be appreciate :) …
ibsLdn
  • 79
  • 1
  • 3
4
votes
1 answer

Using search with Bloodhound

I am trying to find out how Bloodhound works (without typeahead). var engine = new Bloodhound({ local: [{ id: 1, name: 'dog' }, { id: 2, name: 'pig' }], identify: function(obj) { return obj.id; }, queryTokenizer:…
maxime schoeni
  • 2,666
  • 2
  • 18
  • 19
4
votes
1 answer

Searchkick + Bloodhound + Typeahead for autocomplete

I am trying to implement a simple autocomplete feature for a single attribute. Model: searchkick text_start: [:name],autocomplete: ['name'] After reindexing the behaviour on the Rails console is ok. 2.2.0-p0 :002 >Doctor.search("a",…
rnjai
  • 1,065
  • 2
  • 17
  • 32
4
votes
2 answers

Typeahead and Bloodhound shows unrelated suggestions when 'remote' is used

When using Typeahead/Bloodhound with a remote option, when the local/prefetch results are under the "limit" (5) the suggestions shown are not related to the input. Looks likes its just showing from the top of the results set up to 5. Photo: 'Love'…
Micah
  • 1,676
  • 16
  • 23
4
votes
2 answers

typeahead.js showing all results instead of just matching results

I'm having trouble getting typeahead.js to return only results that match the inputted query. For example, if I type in "Facebook" to my company search bar, it will return all companies ("Yahoo", "Google", etc.) even though most of these don't match…
XcrossY
  • 203
  • 2
  • 11
4
votes
1 answer

Twitter's typeahead + Bloodhound with JSON objects

I can't get it to work with JSON objects. I've followed multiple questions here on SO and none of the answers helped me. $(function() { var items = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name'), …
Mave
  • 2,413
  • 3
  • 28
  • 54
4
votes
1 answer

Twitter Typeahead.js Bloodhound remote returns undefined

Having trouble getting Twitter Typeahead.js, the remote version to work. I get "undefined" for my suggestions. Any help would be appreciated. Code below: JS: var films = new Bloodhound({ datumTokenizer:…
alyus
  • 987
  • 4
  • 20
  • 39
4
votes
3 answers

Typeahead insensitive accent

I tried this solution but I got this error : Uncaught ReferenceError: normalized is not defined Here is my code : var charMap = { "à": "a", "â": "a", "é": "e", "è": "e", "ê": "e", "ë": "e", "ï": "i", "î": "i", "ô": "o", "ö": "o", "û":…
youcef
  • 78
  • 2
  • 5
4
votes
2 answers

AutoComplete with any part of the word

what i am looking for is to display suggestion not just with what the word starts but if it meets any part of the word. for example if i have a list of word [ Manimal, animal, person, erson] when i type animal or ani it should display both Manimal…
Justin Homes
  • 3,739
  • 9
  • 49
  • 78
3
votes
1 answer

Typeahead and Bloodhound dynamically change local values

I am using Typeahead (with default suggestions) with Bloodhound and everything works fine so far. However, I have some problems when I try to dynamically change the values of the suggestions. For example, I have an array of available suggestions…
3
votes
1 answer

Programmatically choose list of Bloodhound autocomplete tags with Bootstrap tagsinput

I have a text input that is powered by Bootstrap Tagsinput. Currently, this text input is initialized with a single list of tags that are used in Typeahead autocomplete: $('.tagsInput').tagsinput({ maxChars: 25, maxTags: 5, typeaheadjs:…
Peter
  • 7,020
  • 4
  • 31
  • 51
3
votes
1 answer

Bloodhound JS clears LocalStorage on load

The moment when I require the Bloodhound JS library (v 1.2.1), var Bloodhound = require('bloodhound-js'); the localstorage is wiped clean. I am storing some values there so right now I have a work-around in place where I read all the values,…
Oskar
  • 1,597
  • 4
  • 19
  • 38
3
votes
1 answer

Cancel pending bloodhound request in Twitter typeahead.js

I have twitter typeahead.js setup like this: var filteredSource = new Bloodhound({ datumTokenizer: Bloodhound.tokenizers.obj.whitespace('value'), queryTokenizer: Bloodhound.tokenizers.whitespace, remote: { url:…
doze
  • 129
  • 1
  • 9
3
votes
1 answer

Typeahead/Bloodhound: Removing duplicates from local

I am unclear on how to remove duplicates using the dupDetector parameter in Bloodhound. I am using v. 0.11.1 Pulling the dataset from a database with records like this: building_name room department Rooney 123 English Rooney 456 …
Carey Estes
  • 1,534
  • 2
  • 31
  • 59
3
votes
3 answers

Why is my datumTokenizer never getting called?

I put a breakpoint inside the datumTokenizer function, but it never seems to get called. Why not? Does it work with remote-only data? var engine = new Bloodhound({ datumTokenizer: function(d) { return…
Stephen Horvath
  • 5,188
  • 3
  • 24
  • 31
1 2
3
18 19