lux/query/term_query.h

00001 #ifndef LUX_QUERY_TERMQUERY_H
00002 #define LUX_QUERY_TERMQUERY_H
00003 
00004 #include "query.h"
00005 #include "lux/lexer/term.h"
00006 #include "lux/index/search_index.h"
00007 #include <string>
00008 
00009 namespace Lux {
00010 
00011   class SearchIndex;
00012 
00013   class TermQuery : public Query {
00014   public:
00015     static TermQuery *create(Term term, std::string index = "default");
00016     virtual ~TermQuery(void) {};
00017     virtual IndexResultSet search(SearchIndex *si);
00018     Term get_term(void);
00019     std::string get_index(void);
00020     virtual std::string to_str(void);
00021 
00022   private:
00023     Term term_;
00024     std::string index_; // what index to look
00025 
00026     TermQuery(Term term, std::string index = "default")
00027     : term_(term), index_(index)
00028     {}
00029   };
00030 
00031 }
00032 
00033 #endif

Generated on Fri Feb 5 15:50:30 2010 for Lux by  doxygen 1.4.7