searchengine/oss/cl/clucene/src/clucene/search/searchheader.h
changeset 21 2c484ac32ef0
parent 18 3e1f76dd2722
equal deleted inserted replaced
18:3e1f76dd2722 21:2c484ac32ef0
    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 #define LCPIX_DEFAULT_FIELD   L"_aggregate"
       
    28 #define LCPIX_HL_EXCERPT_FIELD  L"_hlexcerpt"
    27 #define LCPIX_HL_EXCERPT_FIELD  L"_hlexcerpt"
    29 #define LCPIX_EXCERPT_FIELD   L"_excerpt"
    28 #define LCPIX_EXCERPT_FIELD   L"_excerpt"
       
    29 #if defined (__SYMBIAN32__)
       
    30 #include <e32std.h>
       
    31 #endif
    30 //#endif
    32 //#endif
    31 
    33 
    32 CL_NS_DEF(search)
    34 CL_NS_DEF(search)
    33 
    35 
    34 	//predefine classes
    36 	//predefine classes
   170 		int32_t maxDocs;			  // max to cache
   172 		int32_t maxDocs;			  // max to cache
   171 //#ifdef USE_HIGHLIGHTER		
   173 //#ifdef USE_HIGHLIGHTER		
   172 		CL_NS2(search,highlight)::SimpleHTMLFormatter hl_formatter;
   174 		CL_NS2(search,highlight)::SimpleHTMLFormatter hl_formatter;
   173 		
   175 		
   174 		CL_NS2(search,highlight)::SimpleFragmenter hl_frag;
   176 		CL_NS2(search,highlight)::SimpleFragmenter hl_frag;
   175         
   177 #if defined (__SYMBIAN32__)        
   176 		CL_NS2(analysis,standard)::StandardAnalyzer hl_analyzer;
   178 		TLanguage lang;
       
   179 #endif		
   177 //#endif		
   180 //#endif		
   178     public:
   181     public:
   179 		Hits(Searcher* s, Query* q, Filter* f, const Sort* sort=NULL);
   182 		Hits(Searcher* s, Query* q, Filter* f, const Sort* sort=NULL);
   180 		~Hits();
   183 		~Hits();
   181 
   184 
   204 		HitDoc* getHitDoc(const size_t n);
   207 		HitDoc* getHitDoc(const size_t n);
   205 	    
   208 	    
   206 		void addToFront(HitDoc* hitDoc);
   209 		void addToFront(HitDoc* hitDoc);
   207 	    
   210 	    
   208 		void remove(const HitDoc* hitDoc);
   211 		void remove(const HitDoc* hitDoc);
       
   212 		
       
   213 		/* Get the tokenstream for Highlighting.
       
   214 		 * @ text Text to be analyzed
       
   215 		 * @ result wchar double pointer to return highlighted text
       
   216 		 * @ firstline Flag for checking first line or Excerpt field.
       
   217 		 */			
       
   218 		void getHighlightedText(CL_NS(document)::Document* document);
   209 
   219 
   210   };
   220   };
   211 
   221 
   212    /** The interface for search implementations.
   222    /** The interface for search implementations.
   213    *
   223    *
   290       *
   300       *
   291       * <p>Applications should usually call {@link
   301       * <p>Applications should usually call {@link
   292       * Searcher#search(Query,Filter,Sort)} instead.
   302       * Searcher#search(Query,Filter,Sort)} instead.
   293       */
   303       */
   294 	  	virtual TopFieldDocs* _search(Query* query, Filter* filter, const int32_t n, const Sort* sort) = 0;
   304 	  	virtual TopFieldDocs* _search(Query* query, Filter* filter, const int32_t n, const Sort* sort) = 0;
   295 //#ifdef USE_HIGHLIGHTER	  	
   305 	  	
   296 	  	virtual void getrewritten(int32_t n, Query* original, Query* rwQuery[])= 0;
       
   297 //#endif	  	
       
   298    };
   306    };
   299 
   307 
   300 
   308 
   301 
   309 
   302 	/** An abstract base class for search implementations.
   310 	/** An abstract base class for search implementations.