question: public void addDocument ( Document d ) { if ( ! m_readMode ) { try { writer . addDocument ( d ) ; m_hitCountCache . clear ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } else { throw new IllegalStateException ( "Documents can not be added to the index unless" + "the LuceneSearcher is not in read mode" ) ; } }
target:  Add a document to the Lucene search index.