-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting Searcher Synchronously? #381
Comments
Hrm, this is a rather interesting question. Examine currently doesn't use Thread.Start but uses a queue of Tasks to perform the indexing. Lucene itself however I believe is quite dependent on Threads but this potentially depends on what is happening. I think in this case you are correct and that it is the NRT functionality. To be able to toggle this functionality in Examine will require some feature updates. We can add a boolean to LuceneIndexOptions to enable/disable NRT but this will have some cascading effects through the indexer along with adding a bunch more unit tests to ensure that the behavior between non-NRT and NRT has the expected results. |
Thanks, if it's infeasible I understand. I was able to directly use Lucene.NET library instead and create/get IndexWriter/IndexSearcher's. So I will go that route for now. Thank you. |
Thanks, i'll close this for now but will look at creating this type of feature in the future. |
FYI While researching I saw some discussion about adding multithreaded support for WASM: dotnet/runtime#68162 (comment) There'll probably be caveats even when supported, but it's possible this will just work in time. |
When in a .NET WASM project, Thread.Start() is not allowed. I believe
_nrtReopenThread.Start();
in LuceneIndex.CreateSearcher() is doing this. I'm inside a using block.WithThreadingMode(IndexThreadingMode.Synchronous)
, but I take it that only affects indexing, and not searching.Is there a work around that would allow me to perform searches synchrounously without threading?
The text was updated successfully, but these errors were encountered: