olivernn / lunr.js

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

Different pipelines for indexing and searching. #83

Closed zs-zs closed 7 years ago

zs-zs commented 10 years ago

The possibility of using different pipelines for indexing and searching would be required for the implementation of some smart token filters/tokenizers - see #80 for an example). This commit demonstrates the idea. Unfortunately, this would imply a change in the basic lunr API, but as it has not reached version 1.0 yet, you could consider to include this feature in your library. (In this case, we have to change the API docs too)

jure commented 10 years ago

Cool idea!

Where would the basic API change be? Are you talking about lunr.Pipeline? I think a reasonable default would be that lunr.Pipeline sets both the index and the search pipelines, but both can also be set separately with lunr.indexPipeline and lunr.searchPipeline respectively.

What am I missing?

olivernn commented 7 years ago

Closing this as support has been added in version 2 of Lunr.