fergies-inverted-index
Advanced tools
Comparing version 6.0.0 to 6.1.0
@@ -211,3 +211,3 @@ 'use strict'; | ||
const keys = []; | ||
db.createKeyStream(ops) | ||
db.createReadStream(ops) | ||
.on('data', data => { keys.push(data); }) | ||
@@ -233,3 +233,5 @@ .on('end', () => resolve(keys)); | ||
gte: field + ':' + token.VALUE.GTE, | ||
lte: field + ':' + token.VALUE.LTE + '○' | ||
lte: field + ':' + token.VALUE.LTE + '○', | ||
keys: true, | ||
values: false | ||
}).then(items => items.map(item => ({ | ||
@@ -246,2 +248,3 @@ FIELD: item.split(/:(.+)/)[0], | ||
DIST: DIST, | ||
EXPORT: getRange, | ||
GET: GET, | ||
@@ -402,2 +405,10 @@ INTERSECTION: INTERSECTION, // AND | ||
// when importing, index is first cleared. This means that "merges" | ||
// are not currently supported | ||
const IMPORT = index => db.clear().then(() => | ||
db.batch(index.map( | ||
entry => Object.assign(entry, { type: 'put' }) | ||
)) | ||
); | ||
const PUT = (docs, putOptions) => writer( | ||
@@ -417,2 +428,3 @@ docs, db, 'put', (putOptions || {}) | ||
DELETE: DELETE, | ||
IMPORT: IMPORT, | ||
PUT: PUT | ||
@@ -437,4 +449,6 @@ } | ||
DISTINCT: init(db, ops).DIST, | ||
EXPORT: init(db, ops).EXPORT, | ||
FIELDS: init(db, ops).FIELDS, | ||
GET: init(db, ops).GET, | ||
IMPORT: init$1(db, ops).IMPORT, | ||
MAX: init(db, ops).MAX, | ||
@@ -441,0 +455,0 @@ MIN: init(db, ops).MIN, |
@@ -207,3 +207,3 @@ import level from 'level'; | ||
const keys = []; | ||
db.createKeyStream(ops) | ||
db.createReadStream(ops) | ||
.on('data', data => { keys.push(data); }) | ||
@@ -229,3 +229,5 @@ .on('end', () => resolve(keys)); | ||
gte: field + ':' + token.VALUE.GTE, | ||
lte: field + ':' + token.VALUE.LTE + '○' | ||
lte: field + ':' + token.VALUE.LTE + '○', | ||
keys: true, | ||
values: false | ||
}).then(items => items.map(item => ({ | ||
@@ -242,2 +244,3 @@ FIELD: item.split(/:(.+)/)[0], | ||
DIST: DIST, | ||
EXPORT: getRange, | ||
GET: GET, | ||
@@ -398,2 +401,10 @@ INTERSECTION: INTERSECTION, // AND | ||
// when importing, index is first cleared. This means that "merges" | ||
// are not currently supported | ||
const IMPORT = index => db.clear().then(() => | ||
db.batch(index.map( | ||
entry => Object.assign(entry, { type: 'put' }) | ||
)) | ||
); | ||
const PUT = (docs, putOptions) => writer( | ||
@@ -413,2 +424,3 @@ docs, db, 'put', (putOptions || {}) | ||
DELETE: DELETE, | ||
IMPORT: IMPORT, | ||
PUT: PUT | ||
@@ -433,4 +445,6 @@ } | ||
DISTINCT: init(db, ops).DIST, | ||
EXPORT: init(db, ops).EXPORT, | ||
FIELDS: init(db, ops).FIELDS, | ||
GET: init(db, ops).GET, | ||
IMPORT: init$1(db, ops).IMPORT, | ||
MAX: init(db, ops).MAX, | ||
@@ -437,0 +451,0 @@ MIN: init(db, ops).MIN, |
{ | ||
"name": "fergies-inverted-index", | ||
"version": "6.0.0", | ||
"version": "6.1.0", | ||
"description": "An inverted index that allows javascript objects to be easily serialised and retrieved using promises and map-reduce", | ||
@@ -5,0 +5,0 @@ "main": "dist/fergies-inverted-index.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37096
880