diff --git a/src/ftshelpers.cc b/src/ftshelpers.cc index cbb9301f5..ff9cf1b72 100644 --- a/src/ftshelpers.cc +++ b/src/ftshelpers.cc @@ -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. diff --git a/src/ui/preferences.cc b/src/ui/preferences.cc index fa50e8928..d48794aaf 100644 --- a/src/ui/preferences.cc +++ b/src/ui/preferences.cc @@ -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