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
I know it's a free software, so I can't expect help in specific cases, but this might help you to iron out some possible bug in node-zoom2 vs. yaz-client. I'm searchin on tcp:tagetes2.oszk.hu:1616/any with the query @attr 1=31 1856 and it works fine with yaz-client, it gets the 1000 records the server is willing find max, but fails with errors in js. It works if I only request like 500 records. Using version 0.9.1 with nodejs 18. If I can help in any way, let me know. Thanks!
import zoom from 'node-zoom2'
import { EventEmitter } from 'events'
import { pEvent } from 'p-event'
await search()
async function search()
{
let event = new EventEmitter()
let z = zoom.Connection('tcp:tagetes2.oszk.hu:1616/any').set('preferredRecordSyntax', 'usmarc')
let cnt = 0
z.query('prefix', '@attr 1=31 1856').search((err, resultset) => {
if(err)
{
console.log(err)
return
}
let hits = resultset.size
console.log(hits, 'hits')
resultset.getRecords(0, hits, (err, records) => {
if(err)
console.log(err)
while (records && records.hasNext())
{
let record = records.next()
if(record.json)
process.stdout.write('.')
else
console.log('error', cnt)
cnt++
}
event.emit('done', resultset)
})
})
await pEvent(event, 'done')
}
The text was updated successfully, but these errors were encountered:
andrisi
changed the title
fails where yaz-client works
fails where yaz-client/php-yaz works
Jul 18, 2023
I know it's a free software, so I can't expect help in specific cases, but this might help you to iron out some possible bug in node-zoom2 vs. yaz-client. I'm searchin on
tcp:tagetes2.oszk.hu:1616/any
with the query@attr 1=31 1856
and it works fine with yaz-client, it gets the 1000 records the server is willing find max, but fails with errors in js. It works if I only request like 500 records. Using version 0.9.1 with nodejs 18. If I can help in any way, let me know. Thanks!The text was updated successfully, but these errors were encountered: