Why do the results for an exact string search include mostly items that do not contain the exact string ? #131132
-
TopicSearch Syntax for exact matches containing forward slashes DetailsI tried to find discussions that contained the ID of a docker container using the exact string
For that I entered in double-quotes : The result set has many/mostly items that include EITHER Similar results if I try to do an advanced query What is a working search syntax for such a query ? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 16 replies
-
|
Hi, To enhance the effectiveness of your exact string searches on GitHub, consider the following professional recommendations:
Implementing these strategies should significantly improve the relevance of your search results on GitHub. Hope Help, ^_^ |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
@Josverl |
Beta Was this translation helpful? Give feedback.
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
|
@Josverl, I do run into the same problem from time to time. As far I know the search function has two unusual behaviours. You can't search for an exact string wrapped in quotes, as you mentioned. You also can't search for incomplete words or the beginning of words, for example |
Beta Was this translation helpful? Give feedback.
This comment was marked as off-topic.
This comment was marked as off-topic.
-
Why do the results for an exact string search include mostly items that do not contain the exact string?GitHub search does not work as a strict exact-match search, even when you wrap your query in quotes. Why this happens1. Token-based search (not literal string matching)GitHub breaks text into tokens (words) and matches them based on relevance, not by matching the full string character-by-character. 2. Quotes affect ranking, not filteringUsing quotes ( 3. Stemming and normalizationGitHub may match:
4. Relevance-based rankingSearch results are ordered by what GitHub considers most relevant, not by strict correctness. Partial matches or nearby terms can rank higher. 5. Multiple fields are searchedMatches may come from:
Even if the string is not visible in the main content, it may exist elsewhere. 6. Indexing and performance trade-offsGitHub’s search is optimized for speed and scale, not perfect precision. Enforcing true exact-string matching everywhere would be expensive and slow. How to get closer to exact matchesUse advanced search qualifiers: |
Beta Was this translation helpful? Give feedback.
@Josverl
I checked with some folks on the dev team; it looks like your search parameters are correct. The problem is with the limitations of the search function in Discussions.
Ill tag this as a product enhancement (Its not quite a bug from a technical standpoint, but close)