Making it easy for you to add search functionality to your Noddity blag or server.
Part of the Noddity ecosystem, lulz
var fields =customParameterInMyMetadata: 10var searcher =var search =
butler is a noddity-butler
fields is an optional key:boost mapping. Add any custom metadata properties you want to use, and tweak their score accordingly.
content are indexed with scores of 10 and 1 respectively. If you want to pass in custom indexing/boosting directions, they might look something like this:
title: 20tags: 50
The construction method returns a function to be used for searching. Explained here:
Whatever text your funky users typed, pass it to the search function and it will be thrown at the side of the lunr index, with the resulting posts returned to you in an error-first callback.