question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

concurrentAdd callback won't return

See original GitHub issue

@eklem Thanks for the encouragement on the other thread. Yes, I do need your help!

I am trying to use search-index in the browser (Chrome). Do you happen to know why concurrentAdd’s callback would never return. I am trying to add about 5k items in 1 swoop.

this.index.concurrentAdd(this.options, batch, (err) => {
            if (!err) {
              console.log('indexing done')
            } else {
              console.log('error is', err)
            }
          })

Lastly, when I search without arguments, I get exactly 20 items, when I check in devtools Application => IndexedDB tab, I see all 5k items in there in the index.

this.index.search().on('data', function (item) {
        console.log(item)
      }).on('end', function () {
        console.log('search ended') // does print
      })

If there is a way to enable some verbose logs, that would surely be helpful.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
eklemcommented, Oct 23, 2018

Hmm, do you get any results on any queries? Also, demobank is a key, isn’t it? I don’t think that will give any results back.

I’ve experienced myself that getting the first query to work takes some tries before I get it right. If you give me a small reproducible example (gist or something), I’ll have a look.

1reaction
eklemcommented, Oct 22, 2018

Actually, looks like there may be something in there: https://github.com/fergiemcdowall/search-index/issues/420

Read more comments on GitHub >

github_iconTop Results From Across the Web

Calling async callback from ConcurrentDictionary - potential ...
I have a concurrent dictionary that is used to manage subscriptions (and interlink with other code), for the sake of this example a...
Read more >
How to Serialize Concurrent Operations in JavaScript
I'll show a simple example implemented in each of these 3 ways, first with callbacks, then with promises, and finally with async/await. For...
Read more >
concurrent.futures — Launching parallel tasks — Python 3.11 ...
Any futures that are completed or running won't be cancelled, regardless of the value of cancel_futures. If both cancel_futures and wait are True...
Read more >
GenServer Callbacks In Dept h - Medium
You can free up your GenServer process by using Task.start/1 and Task.async/2 to run code concurrently. Upon completion, the Task process will ...
Read more >
Callback Gotchas | Dash for Python Documentation | Plotly
In this situation, where a component registered with a callback is missing from the layout, the callback will fail to fire. For example,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found