Improve search with a query language
This is a feature idea.
Sometimes to perform a search can be really painful and hard, having to scroll many kilometers, clients crashing because of data loaded, backend chocking, our eyes craving for any information we can connect to… Real sadness
My proposition is to add a query language for advanced users who knows chunks of information about posts they want to find but "simple" search don’t work. It would allow them to use posts’ metadata to find data they want.
Something based on SQL syntax may be a good start.
Examples
I want to find a post in my bookmarks from user @lain@lain.com
about dishwasher
:
FROM bookmarks WHERE author:@lain@lain.com WHERE body:contains:"dishwasher"
More complex now, let’s say I want to find a bookmarked post where I reacted pusalting_heart
on a user @cute_cats@example.com
post which contains at least one media:
FROM bookmarks WHERE author:@cute_cats@example.com WHERE attachments:true WHERE reactions:pulsating_heart
But we could also search by a time range (inclusive) to find posts close to an event:
FROM posts WHERE time:2020-02-01:2020-02-02 WHERE body:contains:"tenshi":"corndog"
Considerations
To perform big queries (10k yield results) or on old posts (former gSOC instances) could lead to instances to DoS by users, some mechanisms could be implemented such as throttling or a max number of results (with pagination mechanism to avoid even more frustration).
It could also be disabled by default or after a toggle switch "enable advanced features
About the query language, the one I wrote above was purely for example purpose, it has many issues (starting by syntax). Unless database technology is prone to change in future to have something a bit low level near from SQL sounds to be good idea.