1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-25 06:52:06 +02:00

new tokenizer "tolerant"

This commit is contained in:
Thomas Wilkerling
2025-05-23 18:03:10 +02:00
parent db56fa1070
commit 82eed5dc3e
59 changed files with 5479 additions and 5155 deletions

View File

@@ -27,6 +27,17 @@ describe("Tokenizer", function(){
expect(index.search("björn mayer")).to.include(0);
});
it("Should have been added properly to the index: Tolerant", function(){
let index = new Index({ tokenize: "tolerant" });
index.add(0, "björn phillipp mayer");
expect(index.search("björn phillipp")).to.include(0);
expect(index.search("bjönr mayre")).to.include(0);
expect(index.search("bjön maer")).to.include(0);
expect(index.search("börn myaer")).to.include(0);
});
it("Should have been added properly to the index: Forward", function(){
let index = new Index({ tokenize: "forward" });