searchengine/oss/cl/clucene/src/clucene/index/indexreader.cpp
changeset 24 65456528cac2
parent 0 671dee74050a
--- a/searchengine/oss/cl/clucene/src/clucene/index/indexreader.cpp	Tue Oct 05 13:15:12 2010 +0530
+++ b/searchengine/oss/cl/clucene/src/clucene/index/indexreader.cpp	Fri Oct 15 12:09:28 2010 +0530
@@ -296,7 +296,14 @@
   void IndexReader::setNorm(int32_t doc, const TCHAR* field, float_t value){
      setNorm(doc, field, CL_NS(search)::Similarity::encodeNorm(value));
   }
-
+  bool IndexReader::indexExists(){
+  //Func - Checks if an index exists in the directory
+  //Pre  - directory is a valid reference
+  //Post - Returns true if an index exists at the specified directory->
+  //       If the directory does not exist or if there is no index in it.
+  //       false is returned. Added for usecases like connecting device in mass storage mode 
+        return this->indexExists(this->directory);  
+      }
   bool IndexReader::indexExists(const Directory* directory){
   //Func - Static method
   //       Checks if an index exists in the directory