Switch to unified view

a/src/common/rclconfig.h b/src/common/rclconfig.h
...
...
53
53
54
    void init(RclConfig *rconf, ConfNull *cnf, const string& nm);
54
    void init(RclConfig *rconf, ConfNull *cnf, const string& nm);
55
    bool needrecompute();
55
    bool needrecompute();
56
};
56
};
57
57
58
// Data associated to a indexed field name: 
59
struct FieldTraits {
60
    string pfx; // indexing prefix, 
61
    int    wdfinc; // Index time term frequency increment (default 1)
62
    double boost; // Query time boost (default 1.0)
63
    FieldTraits(int i, double f) {wdfinc = i; boost = f;}
64
    FieldTraits() : wdfinc(1), boost(1.0) {}
65
    FieldTraits(const string& s) : pfx(s), wdfinc(1), boost(1.0) {}
66
};
67
58
class RclConfig {
68
class RclConfig {
59
 public:
69
 public:
60
70
61
    // Constructor: we normally look for a configuration file, except
71
    // Constructor: we normally look for a configuration file, except
62
    // if this was specified on the command line and passed through
72
    // if this was specified on the command line and passed through
...
...
186
    bool isMimeCategory(string&);
196
    bool isMimeCategory(string&);
187
    /** mimeconf: get list of mime types for category */
197
    /** mimeconf: get list of mime types for category */
188
    bool getMimeCatTypes(const string& cat, list<string>&);
198
    bool getMimeCatTypes(const string& cat, list<string>&);
189
199
190
    /** fields: get field prefix from field name */
200
    /** fields: get field prefix from field name */
191
    bool getFieldPrefix(const string& fldname, string &pfx);
201
    bool getFieldTraits(const string& fldname, const FieldTraits **);
192
    /** Get implied meanings for field name (ie: author->[author, from]) */
193
    bool getFieldSpecialisations(const string& fld, 
194
               list<string>& childrens, bool top = true);
195
    /** Get prefixes for specialisations of field name */
196
    bool getFieldSpecialisationPrefixes(const string& fld, 
197
                  list<string>& pfxes);
198
    const set<string>& getStoredFields() {return m_storedFields;}
202
    const set<string>& getStoredFields() {return m_storedFields;}
199
    set<string> getIndexedFields();
203
    set<string> getIndexedFields();
200
    /** Get canonic name for possible alias */
204
    /** Get canonic name for possible alias */
201
    string fieldCanon(const string& fld);
205
    string fieldCanon(const string& fld);
202
    /** Get xattr name to field names translations */
206
    /** Get xattr name to field names translations */
...
...
254
    ConfStack<ConfTree> *m_conf;   // Parsed configuration files
258
    ConfStack<ConfTree> *m_conf;   // Parsed configuration files
255
    ConfStack<ConfTree> *mimemap;  // The files don't change with keydir, 
259
    ConfStack<ConfTree> *mimemap;  // The files don't change with keydir, 
256
    ConfStack<ConfSimple> *mimeconf; // but their content may depend on it.
260
    ConfStack<ConfSimple> *mimeconf; // but their content may depend on it.
257
    ConfStack<ConfSimple> *mimeview; // 
261
    ConfStack<ConfSimple> *mimeview; // 
258
    ConfStack<ConfSimple> *m_fields;
262
    ConfStack<ConfSimple> *m_fields;
259
    map<string, string>  m_fldtopfx;
263
    map<string, FieldTraits>  m_fldtotraits; // Field to field params
260
    map<string, string>  m_aliastocanon;
264
    map<string, string>  m_aliastocanon;
261
    set<string>          m_storedFields;
265
    set<string>          m_storedFields;
262
    map<string, string>  m_xattrtofld;
266
    map<string, string>  m_xattrtofld;
263
267
264
    void        *m_stopsuffixes;
268
    void        *m_stopsuffixes;