-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
relevance of search results #55
Comments
It seems that I am ordering the results based on their if category is not None:
tutorials = Tutorial.objects.filter(
(Q(title__icontains=query) | Q(tags__name__in=list_query))
& Q(category__icontains=category)
).order_by('id').filter(publish=True).distinct()
else:
tutorials = Tutorial.objects.filter(
(Q(title__icontains=query) | Q(tags__name__in=list_query))
).order_by('id').filter(publish=True).distinct() removing |
Hey @Bhupesh-V if nobody's worked on this already, I'd be happy to! |
@bookRa you can work on this 👍 |
@Bhupesh-V how do I spin up this app and use it locally with a database of tutorials? I've used I would appreciate any advice, or step-by-step to working with the local database. Sorry if it's obvious but I don't have too much exp with Django framework 😅 |
It's not a database issue as far as I know. We added a @bookRa, you need to publish the added tutorial through the admin site. That will make the tutorial visible on the site. |
Describe the bug
Currently if we search java tutorials, the search results are javascript tutorials.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Relevant search results should appear, we have to give preference to Java tutorials instead of JavaScript.
Additional context
Maybe we need to add priorities to tags.
The text was updated successfully, but these errors were encountered: