Load similar topics

AI-generated summary

Load Similar Topics: Harshit_Dave asked if it’s possible to load similar topics when the composer loads, given a title. Harshit_Dave found a solution by triggering the find-similar event using this.appEvents.trigger("composer:find-similar"). However, Lilly pointed out that this can be achieved through the admin UI settings. Harshit_Dave noted that changing the settings didn’t work for them, and triggering the event was necessary to load similar topics based on pre-filled title data.

Hello Discourse,

can I load the similar topics as soon as composer loads if it has title? If yes, then can anyone please let me know how can I do that?

Thanks!

I found one solution, in case anyone else needed. we can trigger this find-similar event for similar topics. which will load the data on composer from ComposerMessages component.

this.appEvents.trigger(“composer:find-similar”)

Other solutions/suggestions are welcome!

Can you give detail on how to input this in? Is it simply adding that line somewhere?

There are settings in the admin UI for this:

Thanks that is much clearer. Think have saw this setting. But the premise seem to look like maybe was using code to install a trigger. :wink:

Thanks @Lilly,

I tried changing that but it didn’t work for me. And, In my case I had to load the similar topics as soon as composer loads as I have pre-filled title data. Hence, I trigger the event which loads the similar topic based on input title