Skip to content

Commit

Permalink
fix: prioritize the manual set full text index option per dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Aug 20, 2024
1 parent 57f0934 commit 67081f0
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/dict/aard.cc
Original file line number Diff line number Diff line change
Expand Up @@ -263,14 +263,13 @@ class AardDictionary: public BtreeIndexing::BtreeDictionary

void setFTSParameters( Config::FullTextSearch const & fts ) override
{
if(enable_FTS.has_value()){

if ( enable_FTS.has_value() ) {
can_FTS = enable_FTS.value();
}
else {
can_FTS = fts.enabled && !fts.disabledTypes.contains( "AARD", Qt::CaseInsensitive )
&& ( fts.maxDictionarySize == 0 || getArticleCount() <= fts.maxDictionarySize );
}
else
{
can_FTS = enable_FTS && fts.enabled && !fts.disabledTypes.contains( "AARD", Qt::CaseInsensitive )
&& ( fts.maxDictionarySize == 0 || getArticleCount() <= fts.maxDictionarySize );

}

protected:
Expand Down

0 comments on commit 67081f0

Please sign in to comment.