The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

gjordan (1) [Avatar] Offline
in the current version of the book, it notes (pg. 83 in my pdf), "Note that we close the searcher, and then the directory, after we are done. In general itÂ’s best to keep these open and share a single searcher for all queries that need to run. Opening a new searcher can be a costly operation as it must load and populate internal data structures from the index."

does that mean don't close the searcher? either it's not clear from the text and/or it's not evident if this is best practice.

mike.mccandless (221) [Avatar] Offline
Re: closing the searcher
Right, don't close the searcher. Reuse it for as long as you can.