search gui: allow specifying fields in complex search panel

This commit is contained in:
Jean-Francois Dockes
2011-03-30 18:52:44 +02:00
parent e883c4d04e
commit e61712fc90
4 changed files with 52 additions and 15 deletions
+11
View File
@@ -673,6 +673,17 @@ bool RclConfig::getFieldPrefix(const string& _fld, string &pfx)
}
}
set<string> RclConfig::getIndexedFields()
{
set<string> flds;
if (m_fields == 0)
return flds;
list<string> sl = m_fields->getNames("prefixes");
flds.insert(sl.begin(), sl.end());
return flds;
}
// Return specialisations of field name for search expansion
// (ie: author->[author, from])
bool RclConfig::getFieldSpecialisations(const string& fld,
+1
View File
@@ -197,6 +197,7 @@ class RclConfig {
bool getFieldSpecialisationPrefixes(const string& fld,
list<string>& pfxes);
const set<string>& getStoredFields() {return m_storedFields;}
set<string> getIndexedFields();
/** Get canonic name for possible alias */
string fieldCanon(const string& fld);
/** Get xattr name to field names translations */