Skip to content

Commit

Permalink
Exclude success stories and technical reference sections from the doc…
Browse files Browse the repository at this point in the history
…umentation / help locator
  • Loading branch information
nirvn committed Aug 2, 2024
1 parent ec9d56d commit d464831
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/locator/helplocatorfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,17 @@ void HelpLocatorFilter::fetchResults( const QString &string, const QgsLocatorCon

if ( locationLocale == userLocale )
{
if ( location.startsWith( QStringLiteral( "reference/" ) ) || location.startsWith( QStringLiteral( "%1/reference/" ).arg( userLocale ) ) || location.startsWith( QStringLiteral( "success-stories/" ) ) || location.startsWith( QStringLiteral( "%1/success-stories/" ).arg( userLocale ) ) )
{
continue;
}

bool match = false;
int matchScore = 0;
for ( const QString &word : words )
{
match = title.contains( word ) || text.contains( word );
matchScore += title.count( word ) * 2 + text.count( word );
matchScore += title.count( word ) * 3 + text.count( word );
}

if ( match )
Expand Down

0 comments on commit d464831

Please sign in to comment.