From dee08c7d70c9121d34521b0c949ac049f8bfcca6 Mon Sep 17 00:00:00 2001 From: MHetherington Date: Wed, 14 Feb 2018 15:53:58 +1100 Subject: [PATCH] Datum tokenizer on example fixed The datumTokenizer was using the whitespace tokenizer, but that does not work with each datum item being an object with id and name properties. --- doc/bloodhound.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/bloodhound.md b/doc/bloodhound.md index ebb4df6d..7c44b5c9 100644 --- a/doc/bloodhound.md +++ b/doc/bloodhound.md @@ -122,7 +122,7 @@ Returns the data in the local search index corresponding to `ids`. local: [{ id: 1, name: 'dog' }, { id: 2, name: 'pig' }], identify: function(obj) { return obj.id; }, queryTokenizer: Bloodhound.tokenizers.whitespace, - datumTokenizer: Bloodhound.tokenizers.whitespace + datumTokenizer: Bloodhound.tokenizers.obj.whitespace('name') }); engine.get([1, 3]); // [{ id: 1, name: 'dog' }, null]