Re: Implement an IndexSearcher which never returns any documents

2017-09-13 Thread Mitchell Stevenson
thx, great solution 2017-09-11 17:55 GMT+02:00 Adrien Grand : > You could create a `new IndexSearcher(new MultiReader());` > > Le sam. 9 sept. 2017 à 19:40, Mitchell Stevenson < > mitchell.stevenson...@gmail.com> a écrit : > >> I need to implement an IndexSearcher for Lucene 7 which never returns

Re: Implement an IndexSearcher which never returns any documents

2017-09-11 Thread Adrien Grand
You could create a `new IndexSearcher(new MultiReader());` Le sam. 9 sept. 2017 à 19:40, Mitchell Stevenson < mitchell.stevenson...@gmail.com> a écrit : > I need to implement an IndexSearcher for Lucene 7 which never returns > any documents. > Is the following implementation suitable for this? Th

Implement an IndexSearcher which never returns any documents

2017-09-09 Thread Mitchell Stevenson
I need to implement an IndexSearcher for Lucene 7 which never returns any documents. Is the following implementation suitable for this? The code seems to work nicely but i am not sure about it. IndexSearcher noDocsSearcher = new IndexSearcher(new NoDocsReader()); public class NoDocsReader extends