Conversation
Notices
-
Embed this notice
@mint
Do you by any chance have a list of interesting/useful pleroma iex commands saved up?
I'm setting up a development environment and thought that it might help with code exploration.
- likes this.
-
Embed this notice
@laurel Pleroma.Emoji.reload for reloading emojis.
Pleroma.Object.Fetcher.fetch_object_from_id("https://instance.tld/objects/abcxyz") for force fetching objects.
Just woke up, can't remember any others yet.
-
Embed this notice
@mint
Thanks, the force fetching one was the one I remembered you posted but status search was being difficult.
-
Embed this notice
@laurel Status search is probably better to be done directly through postgres (select * from objects where data->>'content' LIKE '%query%') if pleromer's search fails for whatever reason.
-
Embed this notice
@mint
Yeah, that's one of the reasons that got me into hosting an instance in the first place.
But the instance is not up yet. I'm at the stage of setting up a local environments with some instances that talk to each other.
Pretty sure you can get more creative with the search starting from the users table, filtering for someone, then joining with objects, etc
-
Embed this notice
@mint @laurel why can't the search routine just do this query on its own?
-
Embed this notice
@JAJAX @laurel I'm sure it does (not exactly, it's using GIN/RUM indexes that are faster), but the query times out before you could receive the API response regardless.