Closed gaby44541 closed 10 years ago
Hi,
Lunr is amazing but one thing that I don't understand. How to recover the value of a field (not only the ref and the score)? Let me explain: I create the index like this:
idx = lunr(function () { this.field('title', { boost: 1 }); this.field('body'); });
and I add document like this:
var doc = { "title": "a title", "body": document, "id": id, "name": name };
I would like recover the field "name" when I search a word. How can I do?
Thanks
This is identical to: https://github.com/olivernn/lunr.js/issues/88
Lunr doesn't store the documents for you, you're supposed to take care of that.
Hi,
Lunr is amazing but one thing that I don't understand. How to recover the value of a field (not only the ref and the score)? Let me explain: I create the index like this:
idx = lunr(function () { this.field('title', { boost: 1 }); this.field('body'); });
and I add document like this:
var doc = { "title": "a title", "body": document, "id": id, "name": name };
I would like recover the field "name" when I search a word. How can I do?
Thanks