Why no static MatchAllDocsQuery.INSTANCE ?
Chris Hostetter <[email protected]> Fri, 10 Oct 2025 11:31:44 -0700 (MST)
| Newsgroups | gmane.comp.jakarta.lucene.devel |
|---|---|
| Message-ID | <alpine.DEB.2.21.2510101126220.29544@slate> |
Does anyone remember ay specific reason why the MatchAllDocsQuery class doesn't contain something like ... public static final MatchAllDocsQuery INSTANCE = new MatchAllDocsQuery(); Tryingto make it a true singleton at this point would certainly break a lot of code -- but is there any reason not to offer a convinience instance for query parsers & rewrite methods & other downstream code to re-use and avoid additional object creation? -Hoss http://www.lucidworks.com/