fix: filter hidden files in lucene query to prevent result loss#271
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom Mar 30, 2026
Merged
fix: filter hidden files in lucene query to prevent result loss#271deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
deepin-bot[bot] merged 1 commit intolinuxdeepin:masterfrom
Conversation
Added hidden file filtering at the query level in the Lucene search implementation. Previously, hidden files were being filtered after the search results were returned, which could cause valid non-hidden files to be excluded when the result set exceeded the maxResults limit. By adding the hidden file filter directly to the Lucene query using a MUST_NOT clause, we ensure that hidden files are excluded before result limiting occurs, preventing the loss of legitimate search results. Influence: 1. Test file searches with hidden files present in the directory 2. Verify that hidden files are properly excluded from search results 3. Test searches with large numbers of files to ensure maxResults limit works correctly 4. Confirm that non-hidden files are not lost when hidden files are present 5. Validate search performance with the new query-level filtering fix: 在 Lucene 查询中过滤隐藏文件以防止结果丢失 在 Lucene 搜索实现中添加了查询级别的隐藏文件过滤。之前隐藏文件是在搜索结 果返回后才被过滤的,这可能导致当结果集超过 maxResults 限制时,有效的非隐 藏文件被排除。通过在 Lucene 查询中直接使用 MUST_NOT 子句添加隐藏文件过滤 器,我们确保隐藏文件在结果限制发生之前就被排除,防止合法搜索结果的丢失。 Influence: 1. 测试目录中存在隐藏文件时的文件搜索 2. 验证隐藏文件是否被正确排除在搜索结果之外 3. 测试包含大量文件的搜索,确保 maxResults 限制正常工作 4. 确认当存在隐藏文件时,非隐藏文件不会丢失 5. 验证新的查询级过滤对搜索性能的影响
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Johnson-zs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/forcemerge |
|
This pr force merged! (status: blocked) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added hidden file filtering at the query level in the Lucene search
implementation. Previously, hidden files were being filtered after the
search results were returned, which could cause valid non-hidden files
to be excluded when the result set exceeded the maxResults limit. By
adding the hidden file filter directly to the Lucene query using a
MUST_NOT clause, we ensure that hidden files are excluded before result
limiting occurs, preventing the loss of legitimate search results.
Influence:
works correctly
present
fix: 在 Lucene 查询中过滤隐藏文件以防止结果丢失
在 Lucene 搜索实现中添加了查询级别的隐藏文件过滤。之前隐藏文件是在搜索结
果返回后才被过滤的,这可能导致当结果集超过 maxResults 限制时,有效的非隐
藏文件被排除。通过在 Lucene 查询中直接使用 MUST_NOT 子句添加隐藏文件过滤
器,我们确保隐藏文件在结果限制发生之前就被排除,防止合法搜索结果的丢失。
Influence: