Giter VIP home page Giter VIP logo

Comments (9)

ts-thomas avatar ts-thomas commented on May 6, 2024 2

I found out that using workers when indexing documents (instead of id-content-pairs) did not work actually. Workers needs a re-implementation to split threads through document fields.

from flexsearch.

nickdandakis avatar nickdandakis commented on May 6, 2024 2

@ts-thomas I was on an earlier version (v0.6.22) instead of latest, where workers weren't working for me even with id-content-pairs. However, using the latest and the callback version of search(), I can get it to work now.

from flexsearch.

ts-thomas avatar ts-thomas commented on May 6, 2024 1

Hello thanks for the report. The problem is that worker have some missing functionality of handling documents. I'm trying to provide a fix for this as soon as possible.

from flexsearch.

eljefedelrodeodeljefe avatar eljefedelrodeodeljefe commented on May 6, 2024

Also looking for this. If you push this further onto the roadmap, let me know, as I can try being of help. Thx.

from flexsearch.

ts-thomas avatar ts-thomas commented on May 6, 2024

Current state

I have added most of the missing features that worker needs to handle documents. During this changes I also added a new distribution model between worker instances to support multi-field-search in parallel (that's a big plus). It has turned out that this distribution is not easy to solve. But I'm optimistic that this will be ready very soon.

from flexsearch.

valdrox avatar valdrox commented on May 6, 2024

Great package!

I have a pretty big json document I want to search, and was wondering if Web workers are even working at all, since they would speed things up it seems.

I am trying to get search via web workers working, but I keep getting undefined search results whenever I set the worker to an integer, which seems similar to this issue.

I tried using the example in the documentation, but that doesn't seem to be working (on jsbin or my local project).

`var index = new FlexSearch({
encode: "icase",
tokenize: "full",
async: true,
worker: 4
});

index.add(10025, "John Doe");

index.search("John Doe", function(results){
console.log(results) // undefined
});

index.search("John Doe").then(function(results){
console.log(results)// undefined
});`
I would expect it to return an array with 10025.

Is there an extra step somewhere that i'm missing?

from flexsearch.

nickdandakis avatar nickdandakis commented on May 6, 2024

I'm seeing roughly the same thing as @valdrox, except instead of getting undefined back, I get an empty array ([]).

from flexsearch.

ts-thomas avatar ts-thomas commented on May 6, 2024

Please notice, that Workers does not work within Node.js, it is just available through a Browser. Running multiple instances in Node.js is basically implemented in FlexSearch-Server. I need to move this capability to the client to make a Worker-fallback available in Node.js

from flexsearch.

ts-thomas avatar ts-thomas commented on May 6, 2024

Please change over to the version >= 0.7.x, thanks a lot.

from flexsearch.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.