mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-09-25 04:51:29 +02:00
cleanup benchmark tests
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,26 +2,27 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: flexsearch-0.7.0</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Benchmark: flexsearch-0.7.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 src="https://rawcdn.githack.com/nextapps-de/flexsearch/master/dist/flexsearch.light.min.js"></script>
|
||||
<script type="module">
|
||||
|
||||
import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/0.7.31/dist/module/index.js";
|
||||
import { suite } from "../../bench.js";
|
||||
|
||||
let lib, split = /[^a-z]+/;
|
||||
|
||||
suite["flexsearch-0.7.0"] = {
|
||||
|
||||
init: function(){
|
||||
lib = new FlexSearch.Index({
|
||||
lib = new Index({
|
||||
encode: str => str.toLowerCase().split(split),
|
||||
tokenize: "strict",
|
||||
resolution: 1,
|
||||
cache: false,
|
||||
optimize: false,
|
||||
fastupdate: false,
|
||||
context: {
|
||||
|
58
test/flexsearch-0.8.0-cache/index.html
Normal file
58
test/flexsearch-0.8.0-cache/index.html
Normal file
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: flexsearch-0.8.0-cache</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Benchmark: flexsearch-0.8.0-cache</h2><hr/>
|
||||
<h4>Indexed Text: "Gulliver's Travels" (Swift Jonathan 1726)</h4>
|
||||
<p style="color: #f00">This test is using query cache and is outside the competition! It is just there for completion.</p>
|
||||
<div id="result" style="white-space: pre; font-family: Monospaced, monospace"></div>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/flexsearch.light.min.js"></script>
|
||||
<script type="module">
|
||||
|
||||
import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/module-min/lang/en.js";
|
||||
import { suite } from "../../bench.js";
|
||||
|
||||
let lib;
|
||||
|
||||
suite["flexsearch-0.8.0-cache"] = {
|
||||
|
||||
init: function(){
|
||||
lib = new FlexSearch.Index({
|
||||
encoder: EnglishPreset,
|
||||
tokenize: "strict",
|
||||
resolution: 1,
|
||||
cache: true,
|
||||
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.searchCache(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>
|
@@ -2,32 +2,32 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Benchmark</title>
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: flexsearch-0.8.0-soundex</title>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Benchmark: flexsearch-0.8.0</h2><hr/>
|
||||
<h2>Benchmark: flexsearch-0.8.0-soundex</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/v0.8-preview/dist/flexsearch.compact.min.js"></script>
|
||||
<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 EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/module-min/lang/en.js";
|
||||
import { suite } from "../../bench.js";
|
||||
|
||||
let lib;
|
||||
|
||||
suite["flexsearch-0.8.0"] = {
|
||||
suite["flexsearch-0.8.0-soundex"] = {
|
||||
|
||||
init: function(){
|
||||
lib = new Index({
|
||||
lib = new FlexSearch.Index({
|
||||
encoder: new FlexSearch.Encoder(
|
||||
FlexSearch.Charset.LatinSoundex,
|
||||
EnglishPreset
|
||||
),
|
||||
tokenize: "strict",
|
||||
resolution: 1,
|
||||
encoder: new Encoder(
|
||||
EnglishPreset,
|
||||
SoundexEncoder
|
||||
),
|
||||
cache: false,
|
||||
context: {
|
||||
depth: 1,
|
||||
bidirectional: false,
|
||||
|
@@ -9,18 +9,10 @@
|
||||
<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 src="https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/dist/flexsearch.compact.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/flexsearch.light.min.js"></script>
|
||||
<script type="module">
|
||||
|
||||
// import Index from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/index.js";
|
||||
// import Encoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/encoder.js";
|
||||
import DefaultEncoder from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/lang/latin/default.js";
|
||||
import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/5532ff3b82906fd8c0595840505174b928916a55/lang/en.js";
|
||||
|
||||
// import Index from "../../../src/index.js";
|
||||
// import Encoder from "../../../src/encoder.js";
|
||||
// import DefaultEncoder from "../../../src/lang/latin/default.js";
|
||||
// import EnglishPreset from "../../../src/lang/en.js";
|
||||
import EnglishPreset from "https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/module-min/lang/en.js";
|
||||
import { suite } from "../../bench.js";
|
||||
|
||||
let lib;
|
||||
@@ -29,13 +21,10 @@
|
||||
|
||||
init: function(){
|
||||
lib = new FlexSearch.Index({
|
||||
encoder: EnglishPreset,
|
||||
tokenize: "strict",
|
||||
resolution: 1,
|
||||
cache: false,
|
||||
encoder: new FlexSearch.Encoder(
|
||||
DefaultEncoder,
|
||||
EnglishPreset
|
||||
),
|
||||
context: {
|
||||
depth: 1,
|
||||
bidirectional: false,
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: fuse-7.1.0</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: js-search-2.0.1</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: lunr-2.3.9</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: lyra-0.2.4</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: minisearch-7.1.2</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: orama-3.1.1</title>
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -2,6 +2,7 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Benchmark: wade-0.3.3</title>
|
||||
</head>
|
||||
<body>
|
||||
|
Reference in New Issue
Block a user