2 $Id: sourceheader 511311 2006-02-19 14:51:05Z trueg $
4 This file is part of the Strigi project.
5 Copyright (C) 2007 Sebastian Trueg <trueg@kde.org>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of
10 the License, or (at your option) any later version.
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this library; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 Boston, MA 02110-1301, USA.
23 #ifndef STRIGI_SOPRANO_INDEX_READER_H
24 #define STRIGI_SOPRANO_INDEX_READER_H
26 #include <strigi/indexreader.h>
31 class IndexFilterModel
;
40 class IndexReader
: public Strigi::IndexReader
43 IndexReader( ::Soprano::Model
* );
46 int32_t countHits( const Query
& query
);
47 std::vector
<IndexedDocument
> query( const Query
&, int off
, int max
);
48 void getHits( const Strigi::Query
& query
,
49 const std::vector
<std::string
>& fields
,
50 const std::vector
<Strigi::Variant::Type
>& types
,
51 std::vector
<std::vector
<Strigi::Variant
> >& result
,
54 void getChildren( const std::string
& parent
,
55 std::map
<std::string
, time_t>& children
);
57 int32_t countDocuments();
60 time_t mTime( const std::string
& uri
);
61 std::vector
<std::string
> fieldNames();
62 std::vector
<std::pair
<std::string
,uint32_t> > histogram( const std::string
& query
,
63 const std::string
& fieldname
,
64 const std::string
& labeltype
);
65 int32_t countKeywords( const std::string
& keywordprefix
,
66 const std::vector
<std::string
>& fieldnames
);
67 std::vector
<std::string
> keywords( const std::string
& keywordmatch
,
68 const std::vector
<std::string
>& fieldnames
,
69 uint32_t max
, uint32_t offset
);