Site search not working for oneboxed content?


(Brendan Schlagel) #1

Got a question from a user on our forum and not sure about the answer. (Feel free to move to either “bug” or “feature” as appropriate!)

It seems that certain oneboxed content does not turn up in search results. The example we got here is an embedded YouTube video. Searching for either the video title or the URL / YouTube video ID turns up no results in Discourse search.

For example, this video below is embedded using https://www.youtube.com/watch?v=lmFgeFh2nlw

But no search results come up for either Metallica Mixer (part of the title; only shows upon onebox) or the video ID lmFgeFh2nlw (from the URL, which text is actually part of the initial post.)

Not sure whether this is by design, or if we should be seeing search results for this sort of thing. But I can see the use case, namely “has anyone posted this link before”, for any forums where such links are common.


(Jeff Atwood) #2

Let’s see… obscure YouTube video incoming…

I’d expect only the URL is findable in search, let’s see:


(Jeff Atwood) #3

Oddly enough, nope, can’t find the youtube URL by the unique part of the URL (I can’t type it here without it erroneously triggering search results) cc @sam not sure what user expectations should be here.


(Sam Saffron) #4

I think our cooked post -> search data extractor should have special handling to extract HREFs out and add to indexed search data cause you may want to search for them. I think this popped up elsewhere this week as well.


(Brendan Schlagel) #5

Got it, interesting, thanks for taking a look at this!


(Sam Saffron) #6

I am assigning this to me cause it can be implemented quite simply.

We already have the cooked info of:

<div class=\"lazyYT\" data-youtube-id=\"lmFgeFh2nlw\" data-youtube-title=\"Metallica Mixer Explains Missing Bass on 'And Justice for All' [Exclusive]\" data-width=\"480\" data-height=\"270\" data-parameters=\"feature=oembed&amp;wmode=opaque\"></div>

Our post indexer operates on cooked/normalized content (not on raw) so we can easily extract title.

So I need to:

  1. Confirm we re-index after we resolve oneboxes
  2. Add special extraction logic for data-youtube-title

Pretty straight forward and helps search!


(Sam Saffron) #8

This is fixed per:

Requires a rebake for titles to appear in search.


(Sam Saffron) #9

This topic was automatically closed after 26 hours. New replies are no longer allowed.