@orama/orama
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -73,11 +73,5 @@ import { formatElapsedTime, getDocumentIndexId, getDocumentProperties, validateSchema } from '../components/defaults.js'; | ||
} | ||
if (!index) { | ||
index = await createIndex(); | ||
} | ||
if (!sorter) { | ||
sorter = await createSorter(); | ||
} | ||
if (!documentsStore) { | ||
documentsStore = await createDocumentsStore(); | ||
} | ||
index ||= await createIndex(); | ||
sorter ||= await createSorter(); | ||
documentsStore ||= await createDocumentsStore(); | ||
// Validate all other components | ||
@@ -84,0 +78,0 @@ validateComponents(components); |
@@ -187,18 +187,14 @@ const BALANCE_STATE = { | ||
if (balanceFactor === BALANCE_STATE.UNBALANCED_LEFT) { | ||
if (key < parent.left.key) { | ||
parent = rotateRight(parent); | ||
} else { | ||
if (key > parent.left.key) { | ||
parent.left = rotateLeft(parent.left); | ||
parent = rotateRight(parent); | ||
} | ||
parent = rotateRight(parent); | ||
} | ||
if (balanceFactor === BALANCE_STATE.UNBALANCED_RIGHT) { | ||
if (key > parent.right.key) { | ||
parent = rotateLeft(parent); | ||
} else { | ||
if (key < parent.right.key) { | ||
parent.right = rotateRight(parent.right); | ||
parent = rotateLeft(parent); | ||
} | ||
parent = rotateLeft(parent); | ||
} | ||
if (parent == root) { | ||
if (parent === root) { | ||
break; | ||
@@ -205,0 +201,0 @@ } |
{ | ||
"name": "@orama/orama", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"type": "module", | ||
@@ -78,3 +78,3 @@ "description": "Next generation full-text search engine, written in TypeScript", | ||
"vite": "^4.1.4", | ||
"@orama/stemmers": "1.0.3" | ||
"@orama/stemmers": "1.0.4" | ||
}, | ||
@@ -93,4 +93,5 @@ "engines": { | ||
"test:smoke": "tap --rcfile=tests/config/tap.yml tests/smoke/*.test.ts", | ||
"ci": "npm run build && npm run test:ci && npm run test:smoke" | ||
"ci": "npm run build && npm run test:ci && npm run test:smoke", | ||
"pack": "pnpm pack --pack-destination ../../dist" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
510615
6943