NepomukDaemons
sopranoindexreader.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef STRIGI_SOPRANO_INDEX_READER_H
00021 #define STRIGI_SOPRANO_INDEX_READER_H
00022
00023 #include <strigi/indexreader.h>
00024
00025 namespace Soprano {
00026 class Model;
00027 namespace Index {
00028 class IndexFilterModel;
00029 }
00030 }
00031
00032 namespace Strigi {
00033
00034 class Query;
00035
00036 namespace Soprano {
00037 class IndexReader : public Strigi::IndexReader
00038 {
00039 public:
00040 IndexReader( ::Soprano::Model* );
00041 ~IndexReader();
00042
00043 int32_t countHits( const Query& query );
00044 std::vector<IndexedDocument> query( const Query&, int off, int max );
00045 void getHits( const Strigi::Query& query,
00046 const std::vector<std::string>& fields,
00047 const std::vector<Strigi::Variant::Type>& types,
00048 std::vector<std::vector<Strigi::Variant> >& result,
00049 int off, int max );
00050
00051 void getChildren( const std::string& parent,
00052 std::map<std::string, time_t>& children );
00053
00054 int32_t countDocuments();
00055 int32_t countWords();
00056 int64_t indexSize();
00057 time_t mTime( const std::string& uri );
00058 std::vector<std::string> fieldNames();
00059 std::vector<std::pair<std::string,uint32_t> > histogram( const std::string& query,
00060 const std::string& fieldname,
00061 const std::string& labeltype );
00062 int32_t countKeywords( const std::string& keywordprefix,
00063 const std::vector<std::string>& fieldnames);
00064 std::vector<std::string> keywords( const std::string& keywordmatch,
00065 const std::vector<std::string>& fieldnames,
00066 uint32_t max, uint32_t offset );
00067
00068 private:
00069 class Private;
00070 Private* d;
00071 };
00072 }
00073 }
00074
00075 #endif