diff -r d4d56f5e7c55 -r 65456528cac2 searchengine/oss/cl/clucene/src/clucene/search/indexsearcher.cpp --- a/searchengine/oss/cl/clucene/src/clucene/search/indexsearcher.cpp Tue Oct 05 13:15:12 2010 +0530 +++ b/searchengine/oss/cl/clucene/src/clucene/search/indexsearcher.cpp Fri Oct 15 12:09:28 2010 +0530 @@ -16,7 +16,6 @@ #include "clucene/index/term.h" #include "clucene/util/bitset.h" #include "fieldsortedhitqueue.h" - CL_NS_USE(index) CL_NS_USE(util) CL_NS_USE(document) @@ -112,6 +111,8 @@ reader = IndexReader::open(path); readerOwner = true; + + } IndexSearcher::IndexSearcher(CL_NS(store)::Directory* directory){ @@ -124,6 +125,8 @@ reader = IndexReader::open(directory); readerOwner = true; + + } IndexSearcher::IndexSearcher(IndexReader* r){ @@ -134,6 +137,7 @@ reader = r; readerOwner = false; + } IndexSearcher::~IndexSearcher(){ @@ -200,9 +204,10 @@ //Func - //Pre - reader != NULL //Post - - CND_PRECONDITION(reader != NULL, "reader is NULL"); CND_PRECONDITION(query != NULL, "query is NULL"); + + Weight* weight = query->weight(this); Scorer* scorer = weight->scorer(reader); @@ -247,9 +252,12 @@ // inherit javadoc TopFieldDocs* IndexSearcher::_search(Query* query, Filter* filter, const int32_t nDocs, const Sort* sort) { - + + CND_PRECONDITION(reader != NULL, "reader is NULL"); CND_PRECONDITION(query != NULL, "query is NULL"); + + Weight* weight = query->weight(this); Scorer* scorer = weight->scorer(reader); @@ -295,9 +303,12 @@ // filter may or may not be NULL // results is a valid reference to a HitCollector and used to store the results //Post - filter if non-NULL, a bitset used to eliminate some documents - + CND_PRECONDITION(reader != NULL, "reader is NULL"); CND_PRECONDITION(query != NULL, "query is NULL"); + + + BitSet* bits = NULL; SimpleFilteredCollector* fc = NULL;