lunr.js icon indicating copy to clipboard operation
lunr.js copied to clipboard

Feature request

Open crystalfp opened this issue 5 years ago • 1 comments

To put a trimmer first in the pipeline I have to do:

fullTextIndex = lunr(function() {

    this.use(lunr.multiLanguage("en", "it"));

    this.pipeline.after(this.pipeline._stack[0], MyImprovedTrimmer);
}

The usual this.pipeline.add(MyImprovedTrimmer); works, but put my trimmer at the end of the pipeline.

It could be helpful to have added the function this.pipeline.prepend(func) that puts func first in the pipeline.

crystalfp avatar Jul 27 '18 04:07 crystalfp

I think this would be a good addition to the pipeline interface, anyone interested in putting together a PR?

olivernn avatar Aug 28 '18 19:08 olivernn