Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决文件过滤和自带过滤不能同时使用的问题 #77

Merged
merged 2 commits into from
Jan 13, 2024

Conversation

konglongbt
Copy link
Contributor

修改后 pic: size:<2mb demo 和 size:<2mb pic: demo 都可以查询出结果了,另外可以有多个文件过滤,比如 pic: video: demo 可以查询出图片和视频

@lin-ycv
Copy link
Owner

lin-ycv commented Jan 12, 2024

實測了你的修改,好像有一點不對
image

我有其他解決方案,但還在測試哪種效率比較好

@lin-ycv lin-ycv merged commit 4456ec6 into lin-ycv:main Jan 13, 2024
lin-ycv added a commit that referenced this pull request Jan 13, 2024
* 解决文件过滤和自带过滤不能同时使用的问题
* Removed redundant step in parsing filters from settings

---------

Co-authored-by: Lin Yu-Chieh (Victor) <victorlin@gapps.ntust.edu.tw>
@konglongbt
Copy link
Contributor Author

我看了你的实现,只要查询里含有 : ,就替换文件过滤词为空,这样是不是会有问题,应该整体替换吧。比如我搜索 pic size:>1mb,按照你的实现就会变成搜索大于1mb的图片,但原本是搜索大于1mb的包含pic名的文件。

@konglongbt
Copy link
Contributor Author

抱歉刚没看到你在另一个文件改了过滤词的key,是加了 :,这样实现就没问题了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants