1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-08 21:20:41 +02:00
This commit is contained in:
Thomas Wilkerling
2025-03-14 16:36:44 +01:00
parent dc8d04d211
commit 4b20d5454c

View File

@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Benchmark</title>
</head>
<body>
<h2>Benchmark: flexsearch-0.8.0-match</h2><hr/>
<h4>Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</h4>
<div id="result" style="white-space: pre; font-family: Monospaced, monospace"></div>
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.compact.min.js"></script>
<script type="module">
import { suite } from "../../bench.js";
let lib;
suite["flexsearch-0.8.0-match"] = {
init: function(){
lib = new FlexSearch.Index({
tokenize: "reverse",
encoder: FlexSearch.Charset.LatinAdvanced
});
},
add: function(data){
for(let i = 0, len = data.length; i < len; i++){
lib.add(i, data[i]);
}
},
query: function(query){
return lib.search(query, { suggest: true });
}
};
</script>
</body>
</html>