Comments (9)
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.
@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.
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.
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.
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.
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.
I'm seeing roughly the same thing as @valdrox, except instead of getting undefined
back, I get an empty array ([]
).
from flexsearch.
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.
Please change over to the version >= 0.7.x, thanks a lot.
from flexsearch.
Related Issues (20)
- RangeError: Invalid string length HOT 2
- How to import Document in nodejs with ESNext modules (typescript)?
- Invalid regular expression
- Suggestion and tokenize "forward"
- Webpack cannot resolve flexsearch HOT 1
- `IndexOptions` TS interface is missing some options HOT 1
- Current NPM package is stale HOT 2
- Cloning of flexsearch objects
- new Document causes `.default is not a constructor` error HOT 1
- Benchmark link is broken HOT 1
- Setting a string as "encode" doesn't work (confusing document?)
- How to return context (+ or - few lines) around the hits of given search text
- Enriched document search showing duplicate results
- I have a question about how the results are sorted
- Do not force string in Index#add() when custom encoder
- "Document Indexes" link in readme is broken
- Typo in cdn link
- TypeScript doesn't allow omitting id from the document descriptor while the README says it is allowed
- document search option "pluck" is rejected by TypeScript
- Some documents may appear multiple times in the search result
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flexsearch.