equal
deleted
inserted
replaced
19 #include "clucene/util/voidlist.h" |
19 #include "clucene/util/voidlist.h" |
20 #include "clucene/search/explanation.h" |
20 #include "clucene/search/explanation.h" |
21 #include "clucene/search/similarity.h" |
21 #include "clucene/search/similarity.h" |
22 |
22 |
23 //#ifdef USE_HIGHLIGHTER |
23 //#ifdef USE_HIGHLIGHTER |
24 //#include "CLucene/highlighter/SimpleFragmenter.h" |
24 #include "CLucene/highlighter/SimpleFragmenter.h" |
25 //#include "CLucene/highlighter/SimpleHTMLFormatter.h" |
25 #include "CLucene/highlighter/SimpleHTMLFormatter.h" |
26 //#include "CLucene/analysis/standard/StandardAnalyzer.h" |
26 #include "CLucene/analysis/standard/StandardAnalyzer.h" |
27 // |
27 #define LCPIX_DEFAULT_FIELD L"_aggregate" |
28 //#define LCPIX_EXCERPT_FIELD L"_excerpt" |
28 #define LCPIX_HL_EXCERPT_FIELD L"_hlexcerpt" |
|
29 #define LCPIX_EXCERPT_FIELD L"_excerpt" |
29 //#endif |
30 //#endif |
30 |
31 |
31 CL_NS_DEF(search) |
32 CL_NS_DEF(search) |
32 |
33 |
33 //predefine classes |
34 //predefine classes |
166 HitDoc* first; // head of LRU cache |
167 HitDoc* first; // head of LRU cache |
167 HitDoc* last; // tail of LRU cache |
168 HitDoc* last; // tail of LRU cache |
168 int32_t numDocs; // number cached |
169 int32_t numDocs; // number cached |
169 int32_t maxDocs; // max to cache |
170 int32_t maxDocs; // max to cache |
170 //#ifdef USE_HIGHLIGHTER |
171 //#ifdef USE_HIGHLIGHTER |
171 // CL_NS2(search,highlight)::SimpleHTMLFormatter hl_formatter; |
172 CL_NS2(search,highlight)::SimpleHTMLFormatter hl_formatter; |
172 // |
173 |
173 // CL_NS2(search,highlight)::SimpleFragmenter hl_frag; |
174 CL_NS2(search,highlight)::SimpleFragmenter hl_frag; |
174 // |
175 |
175 // CL_NS2(analysis,standard)::StandardAnalyzer hl_analyzer; |
176 CL_NS2(analysis,standard)::StandardAnalyzer hl_analyzer; |
176 //#endif |
177 //#endif |
177 public: |
178 public: |
178 Hits(Searcher* s, Query* q, Filter* f, const Sort* sort=NULL); |
179 Hits(Searcher* s, Query* q, Filter* f, const Sort* sort=NULL); |
179 ~Hits(); |
180 ~Hits(); |
180 |
181 |
290 * <p>Applications should usually call {@link |
291 * <p>Applications should usually call {@link |
291 * Searcher#search(Query,Filter,Sort)} instead. |
292 * Searcher#search(Query,Filter,Sort)} instead. |
292 */ |
293 */ |
293 virtual TopFieldDocs* _search(Query* query, Filter* filter, const int32_t n, const Sort* sort) = 0; |
294 virtual TopFieldDocs* _search(Query* query, Filter* filter, const int32_t n, const Sort* sort) = 0; |
294 //#ifdef USE_HIGHLIGHTER |
295 //#ifdef USE_HIGHLIGHTER |
295 // virtual Query* getrewritten(int32_t n, Query* original)= 0; |
296 virtual void getrewritten(int32_t n, Query* original, Query* rwQuery[])= 0; |
296 //#endif |
297 //#endif |
297 }; |
298 }; |
298 |
299 |
299 |
300 |
300 |
301 |