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

set proper worker path

This commit is contained in:
Thomas Wilkerling
2025-03-07 18:17:01 +01:00
parent 25e4b5d712
commit a00746a2c3
5 changed files with 15 additions and 17 deletions

View File

@@ -1548,7 +1548,7 @@ const flexsearch = new Document({
// the field name needs to be set here
field: "custom_field",
// path to your config from above:
config: "./config.js",
config: "./custom_field.js",
}]
}
});
@@ -1582,7 +1582,7 @@ const flexsearch = await new Document({
// the field name needs to be set here
field: "custom_field",
// Absolute URL to your config from above:
config: "http://localhost/config.js"
config: "http://localhost/custom_field.js"
}]
}
});
@@ -1601,7 +1601,7 @@ Tokens: 128,898,832<br>
The used index configuration has 2 fields (using bidirectional context of `depth: 1`), 1 custom field, 2 tags and a full datastore of all input json documents.
A non-Worker Document index requires 181 seconds to index all contents.<br>
The Worker index takes just 32 seconds to index them all, by processing every field and tag in parallel. For such large content it is a quite impressive result.
The Worker index just takes 32 seconds to index them all, by processing every field and tag in parallel. For such large content it is a quite impressive result.
## Fuzzy-Search

View File

@@ -1,11 +1,10 @@
const { parentPort } = require("worker_threads"),
{ join } = require("path"),
{ Index } = require("../../dist/flexsearch.bundle.min.js");
// TODO EXCHANGE
{ Index } = require("../flexsearch.bundle.min.js");
// Test Path
//const { Index } = require("../../dist/flexsearch.bundle.min.js");
//const { Index } = require("../flexsearch.bundle.min.js");
let index;
parentPort.on("message", function (data) {

View File

@@ -1,11 +1,10 @@
const { parentPort } = require("worker_threads"),
{ join } = require("path"),
{ Index } = require("../../dist/flexsearch.bundle.min.js");
// TODO EXCHANGE
{ Index } = require("../flexsearch.bundle.min.js");
// Test Path
//const { Index } = require("../../dist/flexsearch.bundle.min.js");
//const { Index } = require("../flexsearch.bundle.min.js");
let index;
parentPort.on("message", function (data) {

6
dist/node/node.js vendored
View File

@@ -1,8 +1,8 @@
const { parentPort } = require("worker_threads");
const { join } = require("path");
// TODO EXCHANGE
const { Index } = require("../../dist/flexsearch.bundle.min.js");
//const { Index } = require("../flexsearch.bundle.min.js");
// Test Path
//const { Index } = require("../../dist/flexsearch.bundle.min.js");
const { Index } = require("../flexsearch.bundle.min.js");
let index;

View File

@@ -1,8 +1,8 @@
const { parentPort } = require("worker_threads");
const { join } = require("path");
// TODO EXCHANGE
const { Index } = require("../../dist/flexsearch.bundle.min.js");
//const { Index } = require("../flexsearch.bundle.min.js");
// Test Path
//const { Index } = require("../../dist/flexsearch.bundle.min.js");
const { Index } = require("../flexsearch.bundle.min.js");
let index;