Hello list,

Does this look correct? I am told it is not functioning, in that new entries to the index are not being picked-up?

Thanks
Lee


        try {
            if (! reader.isCurrent()){
                IndexReader newReader = reader.reopen();
                if (newReader != reader) {
                    // reader was reopened
                    searcher.close();
                    reader.close();
                }
                reader = newReader;
                searcher    = new IndexSearcher(reader);
if (searcher == null) throw new ServletException( "searcher is null (init a)" );
            }
        } catch (CorruptIndexException e){
throw new ServletException( "Could not refresh reader? "+e.getMessage() );
        } catch (IOException e){
throw new ServletException( "Could not refresh reader? "+e.getMessage() );
        } catch (Exception e){
throw new ServletException( "Could not re-open reader? "+e.getMessage() );
        }


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to