--- a/searchengine/oss/cl/clucene/src/clucene/search/indexsearcher.cpp Thu Sep 02 21:37:32 2010 +0300
+++ b/searchengine/oss/cl/clucene/src/clucene/search/indexsearcher.cpp Fri Sep 17 08:35:54 2010 +0300
@@ -16,14 +16,6 @@
#include "clucene/index/term.h"
#include "clucene/util/bitset.h"
#include "fieldsortedhitqueue.h"
-//#ifdef USE_HIGHLIGHTER
-#include "CLucene/highlighter/QueryTermExtractor.h"
-#include "CLucene/highlighter/QueryScorer.h"
-#include "CLucene/highlighter/Highlighter.h"
-#include "CLucene/highlighter/SimpleHTMLFormatter.h"
-#include "CLucene/analysis/standard/StandardAnalyzer.h"
-#include "CLucene/queryParser/QueryParser.h"
-//#endif
CL_NS_USE(index)
CL_NS_USE(util)
CL_NS_USE(document)
@@ -119,10 +111,7 @@
reader = IndexReader::open(path);
readerOwner = true;
-//#ifdef USE_HIGHLIGHTER
- fistlnHLQuery = NULL;
- excerptrwQuery = NULL;
-//#endif
+
}
@@ -136,10 +125,7 @@
reader = IndexReader::open(directory);
readerOwner = true;
-//#ifdef USE_HIGHLIGHTER
- fistlnHLQuery = NULL;
- excerptrwQuery = NULL;
-//#endif
+
}
@@ -151,10 +137,7 @@
reader = r;
readerOwner = false;
-//#ifdef USE_HIGHLIGHTER
- fistlnHLQuery = NULL;
- excerptrwQuery = NULL;
-//#endif
+
}
IndexSearcher::~IndexSearcher(){
@@ -223,12 +206,8 @@
//Post -
CND_PRECONDITION(reader != NULL, "reader is NULL");
CND_PRECONDITION(query != NULL, "query is NULL");
-//#ifdef USE_HIGHLIGHTER
- if(!excerptrwQuery || !fistlnHLQuery)
- {
- excerptrwQuery = query->rewrite(reader);
- }
-//#endif
+
+
Weight* weight = query->weight(this);
Scorer* scorer = weight->scorer(reader);
@@ -277,13 +256,8 @@
CND_PRECONDITION(reader != NULL, "reader is NULL");
CND_PRECONDITION(query != NULL, "query is NULL");
+
-//#ifdef USE_HIGHLIGHTER
- if(!excerptrwQuery || !fistlnHLQuery)
- {
- excerptrwQuery = query->rewrite(reader);
- }
-//#endif
Weight* weight = query->weight(this);
Scorer* scorer = weight->scorer(reader);
@@ -333,12 +307,7 @@
CND_PRECONDITION(reader != NULL, "reader is NULL");
CND_PRECONDITION(query != NULL, "query is NULL");
-//#ifdef USE_HIGHLIGHTER
- if(!excerptrwQuery || !fistlnHLQuery)
- {
- excerptrwQuery = query->rewrite(reader);
- }
-//#endif
+
BitSet* bits = NULL;
@@ -380,13 +349,7 @@
}
return query;
}
-//#ifdef USE_HIGHLIGHTER
-void IndexSearcher::getrewritten(int32_t n, Query* original, Query* rwQuery[])
- {
- rwQuery[0] = fistlnHLQuery;
- rwQuery[1] = excerptrwQuery;
- }
-//#endif
+
void IndexSearcher::explain(Query* query, int32_t doc, Explanation* ret){
Weight* weight = query->weight(this);
weight->explain(reader, doc, ret);