marsara9 / lemmy-search

An enhanced search engine just for Lemmy/Fediverse
https://www.search-lemmy.com
GNU Affero General Public License v3.0
81 stars 4 forks source link

[0.4.0]filters by age/date #24

Closed Die4Ever closed 1 year ago

Die4Ever commented 1 year ago

Is your feature request related to a problem? Please describe. For example I wanted to search for discussions about the new episodes of Warrior, so I searched for "Warrior", but that's a common word so a lot of results showed up. If I could filter by posts in the past week then it would've been much easier.

Describe the solution you'd like Some filters for age/date. You can avoid timezone issues if you do it by age. Maybe filters like minage:1day maxage:7day (I guess you could accept day and days interchangeably, don't need to worry about grammar lol)

The front page should also list all the filters possible, especially since it's mostly a blank page anyways.

Describe alternatives you've considered Could also be a dropdown like how Google does it? But that wouldn't be as good.

marsara9 commented 1 year ago

I'm already wanting to add the posted / last updated date to the search results. So it wouldn't be hard to add a query filter to filter by that range as well. Only catch is, I'm currently not storing those data points in the database, so this will have to wait until 0.4.x. In the mean time, if anyone else wants to provide alternative suggestions as to what query terms to use, I'm all ears.

Current suggestions (will keep this updated):

"min/maxage:#days" "since:MM/DD/YYYY" / "until:MM/DD/YYYY" ....

marsara9 commented 1 year ago

The front page should also list all the filters possible, especially since it's mostly a blank page anyways.

Can you raise this as a separate issue? But I want to keep the main page fairly clean, but I've had similar thoughts on this as well, mainly maybe adding some sort of "tooltip" that you can hover over to see filter options.

krestenlaust commented 1 year ago

I'm already wanting to add the posted / last updated date to the search results.

I've created the issue #29

marsara9 commented 1 year ago

Current idea:

since:YYYY-MM-DD and until:YYYY-MM-DD.

Again I'm open to other suggestions if anyone wants to post them here.

krestenlaust commented 1 year ago

Sounds good to me.

You mentioning dates, made me think of whether you've considered localization yet? (Not relevant to this issue, but to the one about displaying the date)

marsara9 commented 1 year ago

Yep. In theory it should be localized to whatever language your browser is set to but I haven't tested it much yet. Feel free to checkout the 0.4.0 release branch yourself though.

krestenlaust commented 1 year ago

Yep. In theory it should be localized to whatever language your browser is set to but I haven't tested it much yet. Feel free to checkout the 0.4.0 release branch yourself though.

sounds good!