In my documentation I have documented /commands formatted in backtick code formatting. However, if I search for “commands” there is no result. The search has to be /commands for the topic to show up.
Is this intentional behaviour? I don’t expect users to search for a specific command prepending the / - both should find the topic imo.
Edit; codeformatting is unrelated, as simply “/commands” ends up in the same issue.
Edit 2; can not reproduce this with for example “.command”, searching for “command” gives the desired result in this case.
Right, I do not expect my users to know upfront that they need to include “/” to find this. Any reason why this behaviour is expected or a possible workaround? Because it seriously affects the search-ability of my documentation.
Search is a complicated matter You want this to surface, but what if you also had other different documents with “commands” and you wouldn’t want documents with “/commands” to show in this case?
One trick you can use is to have keywords in your post:
Oh I do agree it’s complicated! While /commands is an example, I have probably over 100 commands documented. So while using keywords could be an alternative, it’s not ideal.
If the word is found somewhere, it should pop in search, that is my understanding. For example:
I see, imo / shouldn’t be relevant either? Not sure how indexing works, but a setting to change this would help me a lot.
I noticed “somequery” as part of an URL returns the result https://domain.com/somequery-article-today if this URL is somewhere on the forum. This is expected behaviour - I do not know how related these are, but found it interesting that in this case the / is not relevant.
Another thing I noticed after diving into this a little deeper: we have a slash seperated string: query1/query2.
query1 returns a result, query2 returns no results, would you say this is expected too, because that seems more like a bug if U ask me…
Bumping this as I still believe it affects search a lot… some if the annoyances I’ve been having lately:
Github links > username nor repo name is searchable…
X links > usernames are not searchable
There are plenty more examples, if you don’t rely on search a lot these things might go unnoticed, as it does not really affect what you see in search, but what you don’t see. We are not supposed to be constantly thinking about whether or not a topic needs a keyword for find-ability.
This goes especially for drafts/staff sections, where posts are simply not done yet, sometimes stay there for years, or communication is in shorter/internal format. This post would not be findable for the keywords staff and internal if I didn’t add this… because Discourse simply decided they are not relevant? Why?
I can hardly agree that this is not a bug, rather a very uncommon approach for a search index decision.