š This is probably me something wrong but I couldn't find the answer in the docs. I'm creating multiple indexes and have a creator function for them, like:
export const trimmer = (builder: Builder) => {
const trimmerFunction = function (token) {
return token.update(function (s) {
const trimmed = s
.replace(/^[\.,;:()\s]+/, '')
.replace(/[\.,;:()\s]+$/, '');
return `${trimmed}`;
});
};
// Register the pipeline function so the index can be serialised
lunr.Pipeline.registerFunction(trimmerFunction, 'trimmerCustom');
// Add the pipeline function to both the indexing pipeline and the search pipeline
builder.pipeline.add(trimmerFunction);
builder.searchPipeline.add(trimmerFunction);
};
š This is probably me something wrong but I couldn't find the answer in the docs. I'm creating multiple indexes and have a creator function for them, like:
I also wrote a simple trimmer plugin.
Then I initialize two indexes:
I would expect that calling
.use
would init the plugin once per index, but instead I get:Is there some way to get around this issue?