1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-09-03 02:42:53 +02:00

force cache refresh of githack files

This commit is contained in:
Thomas Wilkerling
2025-03-05 10:58:44 +01:00
parent 3f6e50a0cb
commit 87184d38ba
3 changed files with 70 additions and 12 deletions

View File

@@ -159,12 +159,12 @@ queue.push({
prepare: null,
fn: function(){
//lib.query("there were six spanish pieces of four pistoles");
//lib.query("glumdalclitch and i attended the king and queen in a progress");
lib.query("glumdalclitch and i attended the king and queen in a progress");
lib.query("only in this island of luggnagg the appetite for living was not so eager");
},
end: null,
complete: null,
count: 14
count: 25
});
queue.push({

View File

@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Benchmark</title>
</head>
<body>
<h2>Benchmark: flexsearch-0.8.0</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 type="module">
import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/index.js";
import Encoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/encoder.js";
import SoundexEncoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/lang/latin/soundex.js";
import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/lang/en.js";
import { suite } from "../../bench.js";
let lib;
suite["flexsearch-0.8.0"] = {
init: function(){
lib = new Index({
tokenize: "strict",
resolution: 1,
encoder: new Encoder(
EnglishPreset,
SoundexEncoder
),
context: {
depth: 1,
bidirectional: false,
resolution: 1
}
});
},
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, 9999);
},
update: function(data){
for(let i = 0, len = data.length; i < len; i++){
lib.update(i, data[i]);
}
},
remove: function(data){
for(let i = 0, len = data.length; i < len; i++){
lib.remove(i);
}
}
};
</script>
</body>
</html>

View File

@@ -10,9 +10,10 @@
<div id="result" style="white-space: pre; font-family: Monospaced, monospace"></div>
<script type="module">
import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/index.js";
import Encoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/encoder.js";
import DefaultEncoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/lang/latin/default.js";
import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/index.js";
import Encoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/encoder.js";
import DefaultEncoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/lang/latin/default.js";
import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/112c30f50fc1fc27390ba25b475336298b5817fe/lang/en.js";
import { suite } from "../../bench.js";
let lib;
@@ -23,13 +24,10 @@
lib = new Index({
tokenize: "strict",
resolution: 1,
fastupdate: false,
encoder: new Encoder({
assign: DefaultEncoder,
include: {
letter: true
}
}),
encoder: new Encoder(
DefaultEncoder,
EnglishPreset
),
context: {
depth: 1,
bidirectional: false,