lunr-languages icon indicating copy to clipboard operation
lunr-languages copied to clipboard

lunr.de fails with umlaute in wildcard search

Open jonex2 opened this issue 4 years ago • 0 comments

Searching for words with umlaute fails if wildcard search is used:

const lunr = require('lunr')
require('lunr-languages/lunr.stemmer.support')(lunr)
require('lunr-languages/lunr.de')(lunr)

const idx = lunr(function () {
  this.use(lunr.de)
  this.field('text') 
  this.add({
    id: 1,
    text: 'das ist günstig'
  })
})

console.log(idx.search('günstig').length) // result: 1
console.log(idx.search('günsti*').length) // result: 0

I tried a workaround described in a comment of #66, but this didn't work. I would be very happy if the bug could be fixed in lunr.de

jonex2 avatar Oct 15 '21 10:10 jonex2