Re: How to replace deprecated document(i)

2023-09-25 Thread Michael Wechner
cool, thank you very much! I will try to do a pull request re the javadoc documentation, because I think it currently does not tell explicitely how to replace the deprecated method. Thanks Michael Am 25.09.23 um 11:11 schrieb Uwe Schindler: Hi, yes once per search request is the best to s

Re: How to replace deprecated document(i)

2023-09-25 Thread Uwe Schindler
Hi, yes once per search request is the best to start with. You can reuse the instance for multiple requests, but you cannot use it from multiple threads. So it is up to you to make sure you reuse it at best effort. See also the documentation I posted from MIGRATE.txt. If the documentation i

Re: How to replace deprecated document(i)

2023-09-25 Thread Michael Wechner
you mean once per search request? I mean for example GET https://localhost:8080/search?q=Lucene and the following would be executed IndexReader reader = DirectoryReader.open(...); StoredFields  storedfields = reader.storedFields(); IndexSearcher searcher = new IndexSearcher(reader) TopDocs top

Re: How to replace deprecated document(i)

2023-09-25 Thread Uwe Schindler
Background: For performance, it is advisable to get the storedFields() *once* to process all documents in the search result. The resason for the change was the problem of accessing stored fields would otherwise need to use ThreadLocals to keep state. Issue: https://github.com/apache/lucene/pul