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

Add in-site search #28

Open
Oracuda opened this issue Feb 15, 2024 · 2 comments · May be fixed by #56
Open

Add in-site search #28

Oracuda opened this issue Feb 15, 2024 · 2 comments · May be fixed by #56

Comments

@Oracuda
Copy link

Oracuda commented Feb 15, 2024

Elasticsearch could be used for searching, or a slower SQL query.

On the API end, modifiers such as the following could be included in the search string for more customization, for example:

parent:identifier or in:identifier to search the comments of a specific post, the posts of a specific community, or the comments by a specific user. perhaps also author:identifier or by:identifier

type:what such as type:community, type:comment, type:post and type:user to search the type of the following.

If these modifiers aren't specified, the backend could assume based upon the API endpoint being used, perhaps making multiple queries for different types, for example: some users, some communities, some posts, etc.

Some examples of fully customized, but not nessacary search string would be:
type:post in:gaming tetris
type:user tetrispro549
type:comment author:tetrispro549 in:1233214 as a post id or type:comment author:tetrispro549 in:gaming

I've made a quick jsfiddle example of what a frontend search could look like, forgive me, for I am not a frontend dev.
https://jsfiddle.net/n4a2foed/2/

@previnder
Copy link
Member

previnder commented Feb 16, 2024

Love the idea of search modifier parameters. It fits very well with one of the core values of Discuit—that is, giving users more control over their experience (and thus not designing everything for the lowest common denominator user).

I was thinking of going with Elasticsearch, but I was also recently recommended Meilisearch. Don't know how good it is and whether it fits our use case; I'll have to take a look at it sometime.

Your UI idea looks nice, but it's probably not necessary. Search modifiers are an 'advance' feature that not everyone will use.

@fredrikburmester
Copy link

This article shows the differences between Elasticsearch, Typesense, Algolia and Meilisearch:

There are some strong arguments for all engines. Some key takeaways are:

  • Elasticsearch does not rely as heavily on RAM and the others, rather disk space. Is not completely open source.
  • Meilisearch only supports a single-node setup (no redundancy). Is also not technically limited by RAM.
  • Typesense supports the most features but is limited by RAM.
  • Algolia is not open source.

@Codycody31 Codycody31 linked a pull request Apr 11, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants