lux/query/phrase_query.h

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

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