Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: a link from the search results lead to egghead.io #250

Closed
YonatanKra opened this issue Jan 3, 2021 · 5 comments
Closed

bug: a link from the search results lead to egghead.io #250

YonatanKra opened this issue Jan 3, 2021 · 5 comments
Labels
bug Something isn't working search

Comments

@YonatanKra
Copy link

I've searched for one of my videos and clicked the link. I was referred to the old egghead website.

Link: https://next.egghead.io/s/javascript-profiling-a-nodejs-app-from-the-chrome-dev-tools

Steps I've taken:

  1. Entered "yonatan kra" in the search bar
  2. Looked around the results
  3. Clicked the title of the wanted lesson
  4. Redirected to egghead.io
@joelhooks
Copy link
Contributor

anything /s is going to forward to the “api domain” because it is reserved for a url shortener

we’d originally used it in our naming convention for this site for search, but had to migrate to /q

https://share.getcloudapp.com/KoulNbZj

I recorded this to try and reproduce the issue and wasn’t able to. A screen recording would be useful.

@YonatanKra
Copy link
Author

@joelhooks - here's a recording: https://youtu.be/mGnB-L8AC28
One thing I didn't mention - I'm using brave as a browser. Might that be the issue?

@joelhooks
Copy link
Contributor

Looks like there is something up with a couple items in Algolia as this particular video is on Page 1 of the results with the proper link and ~4 videos have the /s/* path.

I'm closing this, as it's not related to this application, but we'll look into it.

image

@joelhooks
Copy link
Contributor

image

@joelhooks
Copy link
Contributor

this felt like an indexing anomaly so I just scripted a little cleaner to remove the objects from Algolia:

import algoliasearch from 'algoliasearch'

const client = algoliasearch(APP_ID, API_SECRET)
const index = client.initIndex(INDEX_NAME)

const filter = {
  hitsPerPage: 1200,
  facetFilters: [
    'type:-lesson',
    'type:-course',
    'type:-podcast',
    'type:-talk',
    'type:-playlist',
  ],
}

const results = await index.search('', filter)

const offensiveIds = results.hits
  .filter((hit) => hit.type === null)
  .map((hit) => hit.objectID)

console.log(offensiveIds)

await index.deleteObjects(offensiveIds)

@joelhooks joelhooks added bug Something isn't working search labels Jan 3, 2021
@joelhooks joelhooks added this to Needs triage in egghead dev via automation Jan 3, 2021
@joelhooks joelhooks moved this from Needs triage to Closed in egghead dev Jan 3, 2021
@joelhooks joelhooks removed this from Closed in egghead dev Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working search
Projects
None yet
Development

No branches or pull requests

2 participants