New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@orama/orama

Package Overview
Dependencies
Maintainers
2
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orama/orama - npm Package Compare versions

Comparing version

to
1.2.8

19

dist/methods/search.js

@@ -99,3 +99,3 @@ import { prioritizeTokenScores } from '../components/algorithms.js';

const tokensLength = tokens.length;
if (tokensLength) {
if (tokensLength || properties && properties.length > 0) {
// Now it's time to loop over all the indices and get the documents IDs for every single term

@@ -106,8 +106,13 @@ const indexesLength = propertiesToSearch.length;

const prop = propertiesToSearch[i];
const tokensLength = tokens.length;
for(let j = 0; j < tokensLength; j++){
const term = tokens[j];
// Lookup
const scoreList = await orama.index.search(context, index, prop, term);
safeArrayPush(context.indexMap[prop][term], scoreList);
if (tokensLength !== 0) {
for(let j = 0; j < tokensLength; j++){
const term = tokens[j];
// Lookup
const scoreList = await orama.index.search(context, index, prop, term);
safeArrayPush(context.indexMap[prop][term], scoreList);
}
} else {
context.indexMap[prop][''] = [];
const scoreList = await orama.index.search(context, index, prop, '');
safeArrayPush(context.indexMap[prop][''], scoreList);
}

@@ -114,0 +119,0 @@ const docIds = context.indexMap[prop];

{
"name": "@orama/orama",
"version": "1.2.7",
"version": "1.2.8",
"type": "module",

@@ -91,4 +91,4 @@ "description": "Next generation full-text and vector search engine, written in TypeScript",

"vite": "^4.1.4",
"@orama/stemmers": "1.2.7",
"@orama/stopwords": "1.2.7"
"@orama/stemmers": "1.2.8",
"@orama/stopwords": "1.2.8"
},

@@ -95,0 +95,0 @@ "engines": {

Sorry, the diff of this file is not supported yet