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

fix result highlighting on document worker

This commit is contained in:
Thomas Wilkerling
2025-04-14 14:22:10 +02:00
parent c37605cf7d
commit 8d89fd5b14
48 changed files with 689 additions and 329 deletions

View File

@@ -48,7 +48,7 @@ let DB, TRX;
*/
export default function PostgresDB(name, config = {}) {
if (!this) {
if (!this || this.constructor !== PostgresDB) {
return new PostgresDB(name, config);
}
if ("object" == typeof name) {
@@ -70,7 +70,7 @@ export default function PostgresDB(name, config = {}) {
PostgresDB.prototype.mount = function (flexsearch) {
//if(flexsearch.constructor === Document){
if (!flexsearch.encoder) {
if (flexsearch.index) {
return flexsearch.mount(this);
}
flexsearch.db = this;