Class ThreadedIndexingAndSearchingTestCase


  • public abstract class ThreadedIndexingAndSearchingTestCase
    extends LuceneTestCase
    Utility class that spawns multiple indexing and searching threads.
    • Field Detail

      • dir

        protected org.apache.lucene.store.Directory dir
      • writer

        protected org.apache.lucene.index.IndexWriter writer
    • Constructor Detail

      • ThreadedIndexingAndSearchingTestCase

        public ThreadedIndexingAndSearchingTestCase()
    • Method Detail

      • getCurrentSearcher

        protected abstract org.apache.lucene.search.IndexSearcher getCurrentSearcher()
                                                                              throws Exception
        Throws:
        Exception
      • getFinalSearcher

        protected abstract org.apache.lucene.search.IndexSearcher getFinalSearcher()
                                                                            throws Exception
        Throws:
        Exception
      • releaseSearcher

        protected void releaseSearcher​(org.apache.lucene.search.IndexSearcher s)
                                throws Exception
        Throws:
        Exception
      • getDirectory

        protected org.apache.lucene.store.Directory getDirectory​(org.apache.lucene.store.Directory in)
      • updateDocuments

        protected void updateDocuments​(org.apache.lucene.index.Term id,
                                       Collection<org.apache.lucene.document.Document> docs)
                                throws Exception
        Throws:
        Exception
      • addDocuments

        protected void addDocuments​(org.apache.lucene.index.Term id,
                                    Collection<org.apache.lucene.document.Document> docs)
                             throws Exception
        Throws:
        Exception
      • addDocument

        protected void addDocument​(org.apache.lucene.index.Term id,
                                   org.apache.lucene.document.Document doc)
                            throws Exception
        Throws:
        Exception
      • updateDocument

        protected void updateDocument​(org.apache.lucene.index.Term term,
                                      org.apache.lucene.document.Document doc)
                               throws Exception
        Throws:
        Exception
      • deleteDocuments

        protected void deleteDocuments​(org.apache.lucene.index.Term term)
                                throws Exception
        Throws:
        Exception
      • doAfterIndexingThreadDone

        protected void doAfterIndexingThreadDone()
      • runSearchThreads

        protected void runSearchThreads​(long stopTimeMS)
                                 throws Exception
        Throws:
        Exception
      • smokeTestSearcher

        protected void smokeTestSearcher​(org.apache.lucene.search.IndexSearcher s)
                                  throws Exception
        Throws:
        Exception