Commit fcfebaad authored by kh1's avatar kh1 Committed by The Qt Project
Browse files

Fix search for non-existing term with filters turned on.


Task-number: QTBUG-26733

In case we search with attributes, all fields including the actual
search term needs to match. Otherwise we will find all pages with
matching indexed filter attributes, but ignoring the search term...

Change-Id: I691afb839a4175e800ab71a40ead7963f3c54c31
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
parent e8f6cd2c
No related merge requests found
Showing with 1 addition and 1 deletion
...@@ -269,7 +269,7 @@ bool QHelpSearchIndexReaderClucene::buildTryHarderQuery( ...@@ -269,7 +269,7 @@ bool QHelpSearchIndexReaderClucene::buildTryHarderQuery(
return false; return false;
if (isNegativeQuery(query)) if (isNegativeQuery(query))
return false; return false;
if (!addDefaultQuery(query, fieldName, false, booleanQuery, analyzer)) if (!addDefaultQuery(query, fieldName, !filterAttributes.isEmpty(), booleanQuery, analyzer))
return false; return false;
if (filterAttributes.isEmpty()) if (filterAttributes.isEmpty())
return true; return true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment