-
-
Notifications
You must be signed in to change notification settings - Fork 879
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
Search post by title only. #4677
Comments
I could see this being useful. |
I would like to take up this issue :) |
If no one is working on this I can take it. |
Hi I actually already started working on that issue and implemented the backend part in rust but still have to do the testing I only recently came back from vacation. But there is also the frontend part to implement the checkbox and include the parameter in the query if you want to pick up that? I named my branch "4677-Search-post-by-title-only", and the query parameter is a boolean "search_title_only" in the postquery |
Hi @Nutomic after merging the current main into my branch I get multiple times the same error: "error[E0658]: use of unstable library feature 'lazy_cell'" during building when running the ./test.sh script . Before the merge all tests (including my new added test) run trough without errors ? Am I missing something here? |
You probably need to use a newer Rust version. |
Yes that worked, as this is only a small feature I assume a new test for the api-tests is not needed? I added a test in the src/post_view file. |
@leoseg will you continue working on this issue? |
I dont see any new test in your PR, did you forget to push? As the change is quite small I dont mind merging it without test, but of course better testing is always good. |
Are you referring to my PR? I see it is already approved. I did not add any tests since I did not add any actual query logic. |
I didnt open a pull request yet because it wasnt ready but as I already see @Carlos-Cabello already worked this out. So I guess he continue with the issue, but I think it would be good to at least add a small unit test in post_view , which checks if the query returns less results if only searching for title. |
My test looked like this maybe you can do something similar @Carlos-Cabello
|
@leoseg you can also add that as a PR to @Carlos-Cabello 's branch / PR. |
This issue has been implemented, we can go ahead and close it. |
Hi, sorry for the delay I was busy working, the issue is already merged but I implemented the unittest in post_view.rs and created a pull request: #5033 |
Requirements
Is your proposal related to a problem?
In order to avoid a duplicate post on an already existing topic. I always perform a search within lemmy
/search
type: post, All instances, an order. all community, all creator
But the search actually dig in the body and titles... so in order to search for a specific topics it's become cumbersome..
additionally a search by Title only would make the search quicker and lighter for the system...
Describe the solution you'd like.
May-be a checkbox
search in title only
?Describe alternatives you've considered.
There is none I believe.
Additional context
No response
The text was updated successfully, but these errors were encountered: