mirror of
https://github.com/nextapps-de/flexsearch.git
synced 2025-08-31 09:31:59 +02:00
update examples
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, height=device-height">
|
||||
<title>Example: browser-basic-suggestion</title>
|
||||
<title>Example: browser-legacy-basic-suggestion</title>
|
||||
</head>
|
||||
<body style="white-space: pre">
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/v0.8-preview/dist/flexsearch.light.min.js"></script>
|
||||
<script src="https://rawcdn.githack.com/nextapps-de/flexsearch/aff94f2b1d830e21463b237070f7e6f7eb556b82/dist/flexsearch.light.min.js"></script>
|
||||
<script>
|
||||
|
||||
// create a simple index which can store id-content-pairs
|
||||
@@ -18,7 +18,7 @@
|
||||
const data = [
|
||||
'cats abcd efgh ijkl mnop qrst uvwx cute',
|
||||
'cats abcd efgh ijkl mnop qrst cute',
|
||||
'cats abcd efgh ijkl mnop cute',
|
||||
'cats abcd efgh ijkl dogs cute',
|
||||
'cats abcd efgh ijkl cute',
|
||||
'cats abcd efgh cute',
|
||||
'cats abcd cute',
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
// perform query
|
||||
const result = index.search({
|
||||
query: "black or cute or yellow cat",
|
||||
query: "black dog or cute cat",
|
||||
suggest: true
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user