mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-30 17:20:17 +02:00
update examples
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-basic-persistent</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.bundle.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.bundle.min.js"></script>
|
||||
<script>
|
||||
(async function(){
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-basic-resolver</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.bundle.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.bundle.min.js"></script>
|
||||
<script>
|
||||
|
||||
// create a simple index which can store id-content-pairs
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-basic-suggestion</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.light.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.light.min.js"></script>
|
||||
<script>
|
||||
|
||||
// create a simple index which can store id-content-pairs
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-basic-worker</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.bundle.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.bundle.min.js"></script>
|
||||
<script>
|
||||
(async function(){
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-basic</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.light.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.light.min.js"></script>
|
||||
<script>
|
||||
|
||||
// create a simple index which can store id-content-pairs
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-document-highlighting</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.compact.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.compact.min.js"></script>
|
||||
<script type="module">
|
||||
|
||||
// some test data
|
||||
@@ -21,7 +21,6 @@
|
||||
// create the document index
|
||||
const index = new FlexSearch.Document({
|
||||
document: {
|
||||
id: "tconst",
|
||||
store: true,
|
||||
index: [{
|
||||
field: "title",
|
||||
@@ -48,8 +47,8 @@
|
||||
});
|
||||
|
||||
// display results
|
||||
console.log(suggestions);
|
||||
log(JSON.stringify(suggestions, null, 2));
|
||||
console.log(result);
|
||||
log(JSON.stringify(result, null, 2));
|
||||
|
||||
function log(str){
|
||||
document.body.appendChild(
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-document-persistent</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.bundle.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.bundle.min.js"></script>
|
||||
<script>
|
||||
(async function(){
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-document-worker</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.bundle.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.bundle.min.js"></script>
|
||||
<script>
|
||||
(async function(){
|
||||
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<title>Example: browser-legacy-document</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.compact.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.compact.min.js"></script>
|
||||
<script>
|
||||
|
||||
// some test data
|
||||
|
@@ -6,9 +6,9 @@
|
||||
<title>Example: browser-legacy-language-packs</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.compact.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/flexsearch.compact.min.js"></script>
|
||||
<!-- Load language pack after loading the library -->
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/lang/en.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/9e1b24a124c3d0065b4ddf5cea9d109aca2fb7d2/dist/lang/en.min.js"></script>
|
||||
<script>
|
||||
|
||||
const encoder = new FlexSearch.Encoder(
|
||||
|
Reference in New Issue
Block a user