Switch to unified view

a/src/rcldb/rcldb.h b/src/rcldb/rcldb.h
...
...
14
 *   Free Software Foundation, Inc.,
14
 *   Free Software Foundation, Inc.,
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
15
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
16
 */
16
 */
17
#ifndef _DB_H_INCLUDED_
17
#ifndef _DB_H_INCLUDED_
18
#define _DB_H_INCLUDED_
18
#define _DB_H_INCLUDED_
19
/* @(#$Id: rcldb.h,v 1.42 2006-11-14 13:55:43 dockes Exp $  (C) 2004 J.F.Dockes */
19
/* @(#$Id: rcldb.h,v 1.43 2006-12-05 15:17:59 dockes Exp $  (C) 2004 J.F.Dockes */
20
20
21
#include <string>
21
#include <string>
22
#include <list>
22
#include <list>
23
#include <vector>
23
#include <vector>
24
24
...
...
72
    string origcharset;  // Charset we transcoded from (in case we want back)
72
    string origcharset;  // Charset we transcoded from (in case we want back)
73
                         // Possibly set by handler
73
                         // Possibly set by handler
74
    string title;        // Possibly set by handler
74
    string title;        // Possibly set by handler
75
    string keywords;     // Possibly set by handler
75
    string keywords;     // Possibly set by handler
76
    string abstract;     // Possibly set by handler
76
    string abstract;     // Possibly set by handler
77
    bool   syntabs;      // true if abstract is just the top of doc, not an 
78
                         // explicit document attribute
77
    string fbytes;       // File size. Set by Db::Add
79
    string fbytes;       // File size. Set by Db::Add
78
    string dbytes;       // Doc size. Set by Db::Add from text length
80
    string dbytes;       // Doc size. Set by Db::Add from text length
79
81
80
    // The following fields don't go to the db record
82
    // The following fields don't go to the db record
81
    
83
    
...
...
94
    dmtime.erase();
96
    dmtime.erase();
95
    origcharset.erase();
97
    origcharset.erase();
96
    title.erase();
98
    title.erase();
97
    keywords.erase();
99
    keywords.erase();
98
    abstract.erase();
100
    abstract.erase();
101
  syntabs = false;
99
    fbytes.erase();
102
    fbytes.erase();
100
    dbytes.erase();
103
    dbytes.erase();
101
104
102
    text.erase();
105
    text.erase();
103
    pc = 0;
106
    pc = 0;
...
...
117
    Db();
120
    Db();
118
    ~Db();
121
    ~Db();
119
122
120
    enum OpenMode {DbRO, DbUpd, DbTrunc};
123
    enum OpenMode {DbRO, DbUpd, DbTrunc};
121
    // KEEP_UPDATED is internal use by reOpen() only
124
    // KEEP_UPDATED is internal use by reOpen() only
122
    enum QueryOpts {QO_NONE=0, QO_STEM = 1, QO_BUILD_ABSTRACT = 2,
125
    enum QueryOpts {QO_NONE=0, QO_STEM = 1, QO_KEEP_UPDATED = 8};
123
          QO_REPLACE_ABSTRACT = 4, QO_KEEP_UPDATED = 8};
124
126
125
    bool open(const string &dbdir, OpenMode mode, int qops = QO_NONE);
127
    bool open(const string &dbdir, OpenMode mode, int qops = QO_NONE);
126
    bool close();
128
    bool close();
127
    bool isopen();
129
    bool isopen();
128
130
...
...
181
    This is probably vastly inferior to the type of interface in
183
    This is probably vastly inferior to the type of interface in
182
    Xapian, but we have to start with something simple to
184
    Xapian, but we have to start with something simple to
183
    experiment with the GUI. i is sequential from 0 to some value.
185
    experiment with the GUI. i is sequential from 0 to some value.
184
    */
186
    */
185
    bool getDoc(int i, Doc &doc, int *percent = 0);
187
    bool getDoc(int i, Doc &doc, int *percent = 0);
188
189
    /* Build synthetic abstract out of query terms and term position data */
190
    bool makeDocAbstract(Doc &doc, string& abstract);
186
191
187
    /** Get document for given filename and ipath */
192
    /** Get document for given filename and ipath */
188
    bool getDoc(const string &fn, const string &ipath, Doc &doc, int *percent);
193
    bool getDoc(const string &fn, const string &ipath, Doc &doc, int *percent);
189
194
190
    /** Expand query */
195
    /** Expand query */