Skip to content

Commit

Permalink
opt: do not read splitted headword
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Jun 25, 2024
1 parent fba8fd2 commit fe4f3f1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/btreeidx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1123,7 +1123,12 @@ void BtreeIndex::findArticleLinks( QVector< WordArticleLink > * articleLinks,
return;

if ( headwords )
headwords->insert( QString::fromUtf8( ( i.prefix + i.word ).c_str() ) );
{
if(i.prefix.empty())
{
headwords->insert( QString::fromUtf8( ( i.prefix + i.word ).c_str() ) );
}
}

if ( offsets && offsets->contains( i.articleOffset ) )
continue;
Expand Down

0 comments on commit fe4f3f1

Please sign in to comment.