Closed jpcamara closed 10 years ago
Can you explain a bit more about how lunr will limit searching, or maybe point me to a tutorial or something? :) I haven't played around with it yet, and I feel like I should educate myself a bit.
Sure! Most of what you need to know is on their landing page (http://lunrjs.com), the core of the most useful interface is pretty quick to understand and use
What I mean by limit searching is that it only lets you search everything. There's no way to say "get me badges with the tag 'karate-chop'". You'd just get anything that had karate chop in it and then filter all the documents manually to get the tags right
However, I guess I should have updated this issue a bit as I have added a small nedb layer in at the same time as the lunr indexing. Nedb is an embedded nodejs document store, so I'm using it to retrieve documents and also enable more field specific searches. It's just a small additional piece inside of search.js
Build a simple indexer to back the API. We can use the badgecrawler as a starting point for this, particularly its use of lunr and a static json store. The initial store will be tailored to the content openbadges-discovery needs to interact with and display.
Starting with lunr limits the ability to do granular searches, but we can fake it in the actual API interface.