compute md5 checksums for all docs and optionally collapse duplicates in results
This commit is contained in:
@@ -175,6 +175,8 @@ void rwSettings(bool writing)
|
||||
SETTING_RW(prefs.ssearchAutoPhrase,
|
||||
"/Recoll/prefs/ssearchAutoPhrase", Bool, false);
|
||||
SETTING_RW(prefs.respagesize, "/Recoll/prefs/reslist/pagelen", Num, 8);
|
||||
SETTING_RW(prefs.collapseDuplicates,
|
||||
"/Recoll/prefs/reslist/collapseDuplicates", Bool, false);
|
||||
SETTING_RW(prefs.maxhltextmbs, "/Recoll/prefs/preview/maxhltextmbs", Num, 3);
|
||||
SETTING_RW(prefs.qtermcolor, "/Recoll/prefs/qtermcolor", , "blue");
|
||||
if (!writing && prefs.qtermcolor == "")
|
||||
|
||||
@@ -82,6 +82,7 @@ class PrefsPack {
|
||||
bool startWithAdvSearchOpen;
|
||||
bool startWithSortToolOpen;
|
||||
bool previewHtml;
|
||||
bool collapseDuplicates;
|
||||
// Extra query indexes. This are encoded to base64 before storing
|
||||
// to the qt settings file to avoid any bin string/ charset conv issues
|
||||
list<string> allExtraDbs;
|
||||
|
||||
@@ -471,6 +471,7 @@ void RclMain::startSearch(RefCntr<Rcl::SearchData> sdata)
|
||||
sdata->setStemlang(stemLang);
|
||||
|
||||
Rcl::Query *query = new Rcl::Query(rcldb);
|
||||
query->setCollapseDuplicates(prefs.collapseDuplicates);
|
||||
|
||||
if (!query || !query->setQuery(sdata)) {
|
||||
QMessageBox::warning(0, "Recoll", tr("Can't start query: ") +
|
||||
|
||||
@@ -90,6 +90,20 @@
|
||||
</widget>
|
||||
</hbox>
|
||||
</widget>
|
||||
<widget class="QCheckBox">
|
||||
<property name="name">
|
||||
<cstring>collapseDupsCB</cstring>
|
||||
</property>
|
||||
<property name="toolTip" stdset="0">
|
||||
<string>If checked, results with the same content under different names will only be shown once.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Hide duplicate results.</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLayoutWidget">
|
||||
<property name="name">
|
||||
<cstring>qtermcolor</cstring>
|
||||
|
||||
@@ -97,6 +97,7 @@ void UIPrefsDialog::setFromPrefs()
|
||||
{
|
||||
// Entries per result page spinbox
|
||||
pageLenSB->setValue(prefs.respagesize);
|
||||
collapseDupsCB->setChecked(prefs.collapseDuplicates);
|
||||
maxHLTSB->setValue(prefs.maxhltextmbs);
|
||||
autoSearchCB->setChecked(prefs.autoSearchOnWS);
|
||||
syntlenSB->setValue(prefs.syntAbsLen);
|
||||
@@ -173,6 +174,7 @@ void UIPrefsDialog::accept()
|
||||
{
|
||||
prefs.autoSearchOnWS = autoSearchCB->isChecked();
|
||||
prefs.respagesize = pageLenSB->value();
|
||||
prefs.collapseDuplicates = collapseDupsCB->isChecked();
|
||||
prefs.maxhltextmbs = maxHLTSB->value();
|
||||
|
||||
prefs.qtermcolor = qtermColorLE->text();
|
||||
|
||||
Reference in New Issue
Block a user