chayapan / favlinks

MIT License
1 stars 0 forks source link

6. Search and Filter Favorites #6

Open chayapan opened 7 months ago

chayapan commented 7 months ago
  1. Search and Filter Favorites

As a User: I want to search and filter my favorited URLs.

Objective: To quickly find specific favorites based on title, URL, category, tags and timestamp.

Expectations:

chayapan commented 7 months ago

Search function docs/Search.md

Filter by category and tags

Fields to retrieve the information title, URL, category, tags and timestamp

Idea 1: use query API. Input keywords match to fields title,URL, category, tags. Filter narrow down search. Only limit to category or tag.

Idea 2: use search library that support invert document indexes.

Prototype implementation, just to start.

  1. query is keywords
  2. output is paginated
chayapan commented 7 months ago

See this tutorial for how to use PostgreSQL and do full-text search. https://paulonteri.com/thoughts/full-text-search-django Steps

  1. Simple search API
  2. Use postgres
  3. SearchVector that use many fields in a search

The search function is also noted in the official documentation. https://docs.djangoproject.com/en/5.0/ref/contrib/postgres/search/