ji-devs / ji-devs/ji-cloud

Module search info

Open
#968 2 comments 0 reactions 2 assignees View on GitHub

Nobody has claimed this yet.

backend feature med needs more info R&D Search
Dominant language
Rust
Stars
14
Forks
18
PR merge metrics
No merged PRs in 30d

Description

Searching jigs will be too limited if we restrict it to only the metadata. Rather, we need to use content from the modules to populate the search mechanism.

Suggestion, TBD:

  1. Every Module Body must implement some trait ModuleSearchExt
  2. This trait will have a fn get_search_items(&self) -> Vec<SearchItem>. @dakom / Ji will implement this for the module body structs. Everything else in this issue is probably on @izik1 / LB's side
  3. SearchItem will be an enum with variants like String(String), Image(ImageId), etc. (these are derived directly from the module body data, doesn't require hitting the db at all).
  4. However, SearchItem will impl something like async fn get_search_string(&self) -> String, which does query the db.
  5. Building on these, ModuleSearchExt will ultimately have a single async fn get_search_strings(&self) -> Vec<String>. This can be written on the Trait itself. Perhaps we concat that Vec into one big String blob

Then, with that in place:

  1. We have a mechanism to crawl through all the modules in a jig, extract the strings as above, and populate the algolia index
  2. We have a background queue of jigs to crawl, which periodically does the above for each item in the queue
  3. The queue is updated whenever a jig or any of its modules is updated.

CC @dani-ji @corinnewo

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.