New user tutorial search for "capybara" finds nothing

How to repeat:

  1. Go to a hosted Discourse instance, and sign up as a new user. I signed up at internals.rust-lang.org.

  2. Follow the “Greetings!” new user on-boarding tutorial from @discobot.

  3. Message #15 in the tutorial topic will say:

  1. Click the search icon, type capybara into the box, and click “capybara in this topic” under the search input box.

  2. The result is “No results found.”. I expect two messages to be found (#15, where the text “Try searching for the term “capybara” in this topic” is written, and the earlier message that has the capybara photo).

  3. Searching for other terms does work. Searching the topic for “nasty”, for example, returns two posts.

  4. The word “capybara” is found “in all topics and posts”. So it can be indexed.

  5. I found another report of this problem from May 2017: Search broken in internals forums - meta - Rust Internals So I don’t think it’s a new problem, or unique to my situation.

I think this is severity 3; while it only affects a small number of users and is a mere cosmetic issue, it happens to a brand new user and leaves the impression that the search function is unreliable or the site is poorly maintained.

Kind regards,

Tim

1 Like

Hi! To find out what I can do, say @discobot display help.

1 Like

I tried to repro, but the bot doesn’t want to display the tutorial :cry:


edit: nevermind, it replied after 3 long minutes (that’s too long!).

2 Likes

It worked for me:

I am on my phone though, so perhaps a retry on desktop may be in order for thoroughness.

Update: Worked fine on desktop too.

3 Likes

Thank you for testing! I used Firefox on OpenSUSE desktop. I also just checked on my phone’s Firefox, and had the same “no results found”:

Again, just to be clear, the capybara photo was inserted into the message thread. Searching for the word capybara returns no results, event though it does appear in message #15.

P.S. I didn’t want to muddy the water, but in case it’s important: the modified message with the capybara photo is no longer there in my thread. I don’t know how it got reverted. This is such a specific and unlikely issue, I would think it’s just a one-off thing for me except for the May 2017 report from another user. But I’m OK if you feel that it is best to just archive this topic without further time spent on it, if multiple people are unable to repeat it.

2 Likes

I was actually wondering why “capybara” was the most searched term on my site for a while but now it all makes sense :dizzy_face::rofl:

I clearly didn’t follow the tutorial the whole way through

5 Likes

Same happened to me. But I was so sure there is some glitch in Google or similat that I created an informative topic about capybaras.

Later I felt myself… a bit stupid :joy: But now I know much more what kind creature capybara is. So win-win situation?

3 Likes

It looks like you have to explicitly select the “Search in this topic” option. I just ran through the tutorial, and when it got to that point, I searched for “capybara”:

Starting the search

…and pressed Enter:

Search results after pressing Enter

However, if I return to the search and click on the “capybara in this topic” option:

Search just this topic

…it works!

Screenshot from 2022-08-30 11-23-28

The tutorial does say (emphasis mine):

Try searching for the term “capy​bara” in this topic

…but I agree that it’s not obvious. I suspect the tutorial was written while Discourse still supported “search as you type”, so the search result would appear before you even pressed return. (Also, I believe “search as you type” also searched private messages).

2 Likes

I did this. see OP point #4 (also, #6 & #7). See also the check box is checked in the screen shot of the mobile site I posted.

So far it seems no one has been able to reproduce the error I’m getting. I suspect there’s some corruption in my discobot tutorial message thread. Or else god is a capybara and I’m on their naughty list.

That’s very interesting. I just looked at my test thread, and indeed, the capybara has disappeared! The edit history shows that discobot edited the post, but the actual change is gone:

This does appear to be deliberate:

…which gets called when the discobot state machine moves to a new state:

The cleanup is only supposed to happen when you move out of the tutorial_search state, which happens when you reply with the :herb: emoji. Did you do that in your thread?

Do you remember how long you waited after the post was edited before performing the search? Is it possible that the server was backed up and hadn’t indexed the post by the time you searched?

1 Like

Yes, I did complete the tutorial.

I did it right away. I mean, I completed the tutorial in one sitting. Discobot added the ‘search for capybara’ post at 8:57AM, and I replied :herb: at 9:10AM (August 25, 2022). I filed this same bug on internals.rust-lang in the intervening 15 minutes…

I just tested with Konqueror instead of Firefox. I’ve never used Konqueror on this laptop before, so I figured it would rule out any browser weirdness. I have the same results:

When I search the thread for “nasty”, it shows the correct two results. So the thread is indexed; indeed, one of the “nasty” results is the same discobot result that has "capybara" in it, so that post is indexed. It’s weird.

Thanks for looking.

Tim

At this point, probably the only useful result from this would be if it helps find some problem with the search index or something. I’m happy to do any tests that would be useful, or I’m happy to drop it whenever if it’s run its course.

If you enter the word capybara yourself into the private message thread and then search for it, does it show up? If you’re aiming for a perfect reproduction, you could use the exact text:

1 Like

For what it’s worth, I just created an account on internals.rust-lang.org to test, and it worked for me:

image

I created an account and ran through the tutorial as well. When I searched for Capybara the first time, I did not select “in this topic” to see what search returns I would get by default. I only got replies from other users noting they had not found ‘capybara’:

However once I selected ‘in this topic’ and reran the search, as the tutorial requests, the result was as expected, just as @simonk posted.

1 Like

So not a bug, but perhaps the directions need to be clearer about searching within the current topic?

The UI for search changed @pmusaraj so perhaps the instructions need to be updated as well? I’m not sure.

2 Likes

No, no UX or docs changes needed. It’s clear how to search within the topic. This bug report is about something else, which apparently is unreproducible so it’s not too important.

Thanks!

1 Like

Simon King, thanks for the suggestion! I added this reply there:

Searching the topic for test returns that message (and one other from discobot), but searching for capybara still returns no results:

|

| |

It seems unique to this specific post. I don’t know how to explain the 2017 report, unless it was user error of some kind.

OK, I am very sorry about this. The problem exists between the keyboard and the chair.

My current problem is just due to the ​ in the middle of capybara:

319 Try searching for the term "capy​bara" in this topic

I completely missed that zero-width addition. That explains why searching the topic doesn’t find that word currently, and as Simon King explained, message #1 was already reverted so the true capybara is now gone.

As for my initial problem, I’m happy to assume that was just me hitting Enter instead of selecting this topic, and leave it at that.

In my latest follow-up test I copy-and-pasted the text, so I inadvertently copied the #8203; as well. So, I’m embarrassed but hopefully haven’t wasted too much of your time. Thanks for all the help.

Tim

6 Likes

One addition that could make it very clear is to have a new instance of Discourse include a prewritten topic from discobot saying “Oops, wrong capybara!” and giving instructions to go back to the private message and search the topic, not the whole site.

If Discourse has other such meta topics pre-installed then this is probably a quick thing to add, otherwise it would be more effort than it’s worth, possibly. Just a thought.

1 Like