Skip to content

Commit

Permalink
opt: enable xapian position on default (#1299)
Browse files Browse the repository at this point in the history
* opt: enable xapian position on default

* [autofix.ci] apply automated fixes

---------

Co-authored-by: YiFang Xiao <yifang.xiao@noreply.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 24, 2023
1 parent fb85f68 commit 1e08231
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/ftshelpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,8 @@ void makeFTSIndex( BtreeIndexing::BtreeDictionary * dict, QAtomicInt & isCancell

indexer.set_document( doc );

if ( GlobalBroadcaster::instance()->getPreference()->fts.enablePosition ) {
indexer.index_text( articleStr.toStdString() );
}
else {
indexer.index_text_without_positions( articleStr.toStdString() );
}
indexer.index_text( articleStr.toStdString() );


doc.set_data( std::to_string( address ) );
// Add the document to the database.
Expand Down
1 change: 1 addition & 0 deletions src/ui/preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
ui.allowGls->setChecked( !p.fts.disabledTypes.contains( "GLS", Qt::CaseInsensitive ) );

ui.enablePosition->setChecked( p.fts.enablePosition );
ui.enablePosition->hide();
#ifndef MAKE_ZIM_SUPPORT
ui.allowZim->hide();
#endif
Expand Down

0 comments on commit 1e08231

Please sign in to comment.