@orama/orama
Advanced tools
Comparing version 2.0.24 to 2.1.0
import { createError } from '../errors.js'; | ||
export function prioritizeTokenScores(arrays, boost, threshold = 1, keywordsCount) { | ||
export function prioritizeTokenScores(arrays, boost, threshold = 0, keywordsCount) { | ||
if (boost === 0) { | ||
@@ -4,0 +4,0 @@ throw createError('INVALID_BOOST_VALUE'); |
@@ -117,5 +117,5 @@ import { formatElapsedTime, getDocumentIndexId, getDocumentProperties, validateSchema } from '../components/defaults.js'; | ||
function getVersion() { | ||
return '2.0.24'; | ||
return '2.1.0'; | ||
} | ||
//# sourceMappingURL=create.js.map |
@@ -18,3 +18,3 @@ import { prioritizeTokenScores } from '../components/algorithms.js'; | ||
const shouldCalculateFacets = params.facets && Object.keys(params.facets).length > 0; | ||
const { limit =10 , offset =0 , term , properties , threshold =1 , distinctOn , includeVectors =false } = params; | ||
const { limit =10 , offset =0 , term , properties , threshold =0 , distinctOn , includeVectors =false } = params; | ||
const isPreflight = params.preflight === true; | ||
@@ -21,0 +21,0 @@ const { index , docs } = orama.data; |
@@ -88,3 +88,3 @@ import { getNanosecondsTime, safeArrayPush, formatNanoseconds, removeVectorsFromHits } from '../utils.js'; | ||
params.relevance = Object.assign(defaultBM25Params, params.relevance ?? {}); | ||
const { term ='' , properties , threshold =1 } = params; | ||
const { term ='' , properties , threshold =0 } = params; | ||
const { index , docs } = orama.data; | ||
@@ -91,0 +91,0 @@ const tokens = await orama.tokenizer.tokenize(term, language); |
@@ -175,3 +175,2 @@ import { safeArrayPush } from '../utils.js'; | ||
if (insertCount % rebalanceThreshold === 0) { | ||
console.log(`Rebalancing tree after ${insertCount} inserts...`); | ||
return rebalanceNode(node, key); | ||
@@ -178,0 +177,0 @@ } |
@@ -309,3 +309,3 @@ import type { InsertOptions } from './methods/insert.js'; | ||
* The threshold is a number between 0 and 1 that represents the minimum score of the documents to return. | ||
* By default, the threshold is 1. | ||
* By default, the threshold is 0. | ||
* | ||
@@ -312,0 +312,0 @@ * Full documentation: https://docs.oramasearch.com/open-source/usage/search/threshold |
{ | ||
"name": "@orama/orama", | ||
"version": "2.0.24", | ||
"version": "2.1.0", | ||
"type": "module", | ||
@@ -89,4 +89,4 @@ "description": "Next generation full-text and vector search engine, written in TypeScript", | ||
"typescript": "^5.0.0", | ||
"@orama/stemmers": "2.0.24", | ||
"@orama/stopwords": "2.0.24" | ||
"@orama/stopwords": "2.1.0", | ||
"@orama/stemmers": "2.1.0" | ||
}, | ||
@@ -93,0 +93,0 @@ "engines": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
713612
6961