olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.94k stars 548 forks source link

Retrieve Documents #466

Closed neohed closed 4 years ago

neohed commented 4 years ago

Hi, I've created an index with a pipeline function.

I perform a search and get an array of objects with: { ref, score, matchData }

How do I use this to retrieve the original document I indexed?

I couldn't find an example of this in the docs or unit tests.

thanks,

neohed commented 4 years ago

Ok, I understand now - lunr.js isn't a document store. You need to store the ref field somewhere else.