You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I tried to add some indexed data to my S3 bucket for (Search functionality) using the s3leveldown module. The data is being created properly with indexes. But when I read/search/query using the readstream -> the GTE,LTE options are not being applied and instead it returns the entire result set. Can someone help on this ? Thank you in advance !
An example ::
const levelup = require('levelup');
const si = require('search-index');
const s3leveldown = require('s3leveldown');
Hi @ApsaraDhanasekar11 I can't repreoduce the issue. Are you sure you are using the right keys gte and lte? Here's a quick test I did:
(async()=>{constdb=levelup(s3leveldown(bucket));awaitdb.put('cat','orange');awaitdb.put('dog','black');awaitdb.createReadStream({gte:'test',lte:'test'}).on('data',data=>{console.log('data',data.key.toString(),data);}).on('close',()=>{console.log('done test!')});// ^ no data returnedawaitdb.createReadStream({gte:'cat',lte:'cat'}).on('data',data=>{console.log('data',data.key.toString(),data);}).on('close',()=>{console.log('done cat!')});// ^ cat returned})();
Hi @loune , thanks for replying back. I tried the above same example. When the keyword is 'cat' (which is the key/id) its working fine, but when i give the keyword as 'orange', it brings me all the results..Like in the case::
await db.createReadStream({ gte:'orange', lte:'orange' })
.on('data', data => { console.log('data', data.key.toString(), data); })
.on('close', () => { console.log('done test!') }); // returns both
RESULT OUTPUT::
data cat=orange
data dog=black
done test!
P.S : Where I actually want the "value" to be searched/ restricted upon. Then how can I get about this ?
Hi, I tried to add some indexed data to my S3 bucket for (Search functionality) using the s3leveldown module. The data is being created properly with indexes. But when I read/search/query using the readstream -> the GTE,LTE options are not being applied and instead it returns the entire result set. Can someone help on this ? Thank you in advance !
An example ::
const levelup = require('levelup');
const si = require('search-index');
const s3leveldown = require('s3leveldown');
const s3Store = await levelup(s3leveldown(bucketName, S3Client));
const idx = await si({
db: s3Store,
storeVectors: true
});
idx.PUT(somedata) // creates idx data in s3 bucket
await s3Store.createReadStream(GTE:'test',LTE:'test')
.on('data', d => { console.log(d); }). => results with entire data set
@loune
The text was updated successfully, but these errors were encountered: