NightOwl888 commented on issue #861: URL: https://github.com/apache/lucenenet/issues/861#issuecomment-1754794614
Looks like the approach that you are using to pass in the documents won't scale: https://gist.github.com/ahmadmdabit/a6cf1ad70da3c18c91f433a9da52230c#file-luceneindexer-cs-L183 `J2N.Collections.Generic.List<T>` requires all documents to be stored in RAM at once when it is passed into this method. To make it scale, you should aim to add the documents in small batches and only load the data for the current batch. You can further reduce memory allocations by reusing the same `Document` instance and adding it over and over with different data in it each time. Also, you have `InitReader()` and `InitWriter()`. You should only ever use one of these at a time (not sure if you are doing that, but this design allows both). If you have an open `IndexWriter` instance, you can get a reader by calling the `IndexWriter.GetReader()` method. Anyway, this is not a bug with Lucene.NET so it doesn't belong in GitHub issues. Please refer any usability issues to StackOverflow (be sure to include both the `lucene.net` and `lucene` tags) or the [Lucene.NET user mailing list](https://lucenenet.apache.org/contributing/index.html#ask-a-question) where you are more likely to get a timely answer. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@lucenenet.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org