Questions(text) asked must appear in the StackOverflow title. Does not return any result if spelling mistake or even if some text matches with other questions. #147
kushshiv
started this conversation in
Show and tell
Replies: 1 comment 2 replies
-
Thanks for finding the issue and letting us know 🙂 . As you have found the solution for it, I recommend you to create and pull request 😃 . |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Title
Questions(text) asked by user must appear in the StackOverflow question title. Does not return any result in case of spelling mistake or even if some of the text matches with other questions.
Explanation
Recently noted that if I searched for some question, and if there is a spelling mistake or if some of the text does not match the existing question in StackOverflow, then we don't get any matching query.
It is because as per documentation, the entered text must match the question's title.
As a normal user I don't know what a StackOverflow question title must be having. This does not seems much relevant to me.
Ideally it should return the most matched and most relevant text, as per my entered question i.e. even if some of the text in my question does not exist in the same question, it should show me at least if some text matched.
We can use
q
, to search for free form text parameter in place oftitle
. Which says :Demo
I tried seaching for this question in StackOverflow:
https://stackoverflow.com/questions/70629789/env-data-not-accessible
But missed a spelling
accessible
toaccessable
and got not results.Even if the same question with spelling mistake searched in StackOverflow, it gives some result and even gave result for the question I was searching for:
I think we have to change the search query and search based on
q
instead oftitle
.if I change from :
return f"{self.search_content_url}/2.2/search/advanced?order=desc&sort=relevance&tagged={tags}&title={question}&site=stackoverflow"
to
return f"{self.search_content_url}/2.2/search/advanced?order=desc&sort=relevance&tagged={tags}&q={question}&site=stackoverflow"
Its working properly and giving me relevant result.
Related Changes (PR):
Changes mentioned here: #145
Advise
What do you think @GouravSardana @pranavbaburaj
Beta Was this translation helpful? Give feedback.
All reactions