Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on Improve the search mechanism to find answers to questions with specific tag
Post
Improve the search mechanism to find answers to questions with specific tag
I was searching for all of my answers in questions tagged with the git tag. So I used tag:git user:53078 post_type:2 as the search terms, and it found zero posts.
I removed the post type (tag:git user:53078), and it found only questions.
The only way to find the answers was by removing the tag and searching for the word "git" in the post body, such as git user:53078 post_type:2. It found my answers, but it's not 100% accurate, because it also found this answer, related to a question without the git tag (it has the word "git" in the body, but the question itself is not related to Git).
Of course the same applies if I don't include the user in the search terms: searching for tag:git post_type:2 returns no results, tag:git returns only questions, and the workaround (git post_type:2) found posts without the git tag, such as the one mentioned above and this one.
When searching for answers and a tag, could it consider that I'm looking for answers whose respective question has the given tag?
The workaround I used (searching for a word in the post body) is not ideal, as I'd have to use a word that all the answers have, or do many searches with different words until I find all of them (and I'd still have to filter out the false positives).
PS: I recognize that with the git tag the workaround works well, but that's not always the case with other tags (imagine doing that with the c tag).

2 comment threads