Flockingbird / hunter2

Hunter2 is a job hunt bot that indexes jobs and candidates from the fediverse
https://search.flockingbird.social
MIT License
14 stars 1 forks source link

Remove deleted vacancies from the index #2

Open berkes opened 3 years ago

berkes commented 3 years ago

Intent

Problem

When a user deletes a toot (update), or delete and redrafts it, we are showing results that are no longer available in the fediverse.

We need to remove these from our index too.

Discussion

When deleting a toot, a server may send out a delete event over the fediverse. The mastodon streaming API then emits this as a delete event. We may capture this event, but could miss it.

Structure

Options:

The timed-recheck is more solid and will capture servers going down or toots otherwise dissapearing without sending delete events. It is heavier on server and client.

Example

Toot re-drafted several times:

curl 'https://meili.flockingbird.social/indexes/vacancies/search' -H 'Content-Type: application/json' -H 'X-Meili-API-Key: 3365f08f0ddf01bf8d5f89d21a73b570f11d28e21818bb99d9c849f9c0d2ac05' --data-raw '{"q":"toothpaste","offset":0,"limit":5}'

Check list