nextapps-de / flexsearch

Next-Generation full text search library for Browser and Node.js
Apache License 2.0
12.53k stars 491 forks source link

Nordic characters gives strange results #300

Closed annaskywalker closed 2 years ago

annaskywalker commented 2 years ago

I am using flexsearch together with a GatsbyJS plugin called gatsby-plugin-local-search, where I can pass options for flexsearch into the plugin like this:

engineOptions: { charset: "latin:extra" }

which is the same as this:

var index = new Index({ charset: "latin:extra" });

If i search for example "forhånd", I get a correct result. But I get the same result if I replace the character "å" with either ä, ö, ø or æ.

If I instead search for "forhand" get different results. It's like it doesn't seem to read the nordic characters as it should, but shouldn't that be standard in the "latin" charset?

Am I missing something?

nocortanipincha commented 2 years ago

I am using flexsearch together with a GatsbyJS plugin called gatsby-plugin-local-search, where I can pass options for flexsearch into the plugin like this:

engineOptions: { charset: "latin:extra" }

which is the same as this:

var index = new Index({ charset: "latin:extra" });

If i search for example "forhånd", I get a correct result. But I get the same result if I replace the character "å" with either ä, ö, ø or æ.

If I instead search for "forhand" get different results. It's like it doesn't seem to read the nordic characters as it should, but shouldn't that be standard in the "latin" charset?

Am I missing something?

Hi Anna, I run into the same issue. Have you been able to solve it? Regards

annaskywalker commented 2 years ago

I am using flexsearch together with a GatsbyJS plugin called gatsby-plugin-local-search, where I can pass options for flexsearch into the plugin like this: engineOptions: { charset: "latin:extra" } which is the same as this: var index = new Index({ charset: "latin:extra" }); If i search for example "forhånd", I get a correct result. But I get the same result if I replace the character "å" with either ä, ö, ø or æ. If I instead search for "forhand" get different results. It's like it doesn't seem to read the nordic characters as it should, but shouldn't that be standard in the "latin" charset? Am I missing something?

Hi Anna, I run into the same issue. Have you been able to solve it? Regards

Hi, unfortunately not yet.

ts-thomas commented 2 years ago

Please contact the author of the GatsbyJS plugin. Thanks in advance.