1
0
mirror of https://github.com/nextapps-de/flexsearch.git synced 2025-08-27 15:50:44 +02:00

update index.d.ts

This commit is contained in:
Thomas Wilkerling
2025-05-08 20:47:58 +02:00
parent 650cf81d9e
commit 2431b51a4f
61 changed files with 4455 additions and 4607 deletions

View File

@@ -428,8 +428,6 @@ export default function(DB, DBClass){
let result = await index.searchCache({
query: "karmen or clown or not found",
suggest: true,
// set enrich to true (required)
enrich: true,
// highlight template
// $1 is a placeholder for the matched partial
highlight: "<b>$1</b>"
@@ -449,8 +447,6 @@ export default function(DB, DBClass){
result = await index.searchCache({
query: "karmen or clown or not found",
suggest: true,
// set enrich to true (required)
enrich: true,
// highlight template
// $1 is a placeholder for the matched partial
highlight: "<b>$1</b>"
@@ -470,15 +466,13 @@ export default function(DB, DBClass){
result = await index.search({
query: "karmen or clown or not found",
suggest: true,
// set enrich to true (required)
enrich: true,
pluck: "title",
field: "title",
// highlight template
// $1 is a placeholder for the matched partial
highlight: "<b>$1</b>"
});
expect(result).to.eql([{
expect(result[0].result).to.eql([{
id: 1,
doc: data[0],
highlight: '<b>Carmen</b>cita'