Creation of SimplefacetedSearch is slow. Therefore it should only be created when a new reader is opened (or reopened). DIGY
On Fri, May 27, 2011 at 10:02 AM, Marco Dissel <marco.dis...@gmail.com>wrote: > Our index contains documents with an unique ID (long number) corresponding > to a record in SQL database. I want to start a lucene search within a list > of ID's returned from a SQL resultset. > > IDataReader reader = cmd.Execute("select ID from ...") > long[] ids = GetID's(reader); > string search = Join(ids) /// results in (ID:1 OR ID:2 OR ID:3) > search += " AND (" + <searchstring entered by user> + ")"; > IndexSearcher searcher = new IndexSearcher(_Reader); > Query query = new Lucene.Net.QueryParsers.QueryParser(,,,, search); > TopDocs docs = searcher.Search(query, 1000000); > > Is this the way to go? > > Thanks >