Joystream / Joystream/joystream
Issues with the `search` query
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.4k
- Forks
- 116
- PR merge metrics
- No merged PRs in 30d
Description
I think we found a couple of bugs related to the search query, at least according to my understanding of how that should work. So to start off here's how I expect the query to work, let me know if I have some bad assumptions: Using the text query argument we indicate what keyword we want to search for. Then whereVideo argument is used to filter video results from the initial search and whereChannel is used to filter channels. Changes to whereChannel shouldn't impact filtered videos and vice versa.
So here are the issues I've noticed:
- Providing
whereChannelbreaks filtering of videos. If you runsearch(text: "test", whereVideo:{languageId_eq:"en"}), you will get an expected list of results, videos filtered byenlanguage and some channels. However, if you addwhereChannel: {}to that query (which shouldn't impact videos at all), videos are not properly filtered anymore and you will get some videos withrulanguage. - Similar to the above case, if you run a query with both channels and videos filtered by some language, e.g.
search(text: "test", whereVideo:{languageId_eq:"en"}, whereChannel: {languageId_eq: "ru"}), both videos and channels will have wrong results (in a different language). - Providing only channel language filter (
search(text: "test", whereChannel: {languageId_eq: "ru"})), it seems the resulting videos are filtered by the same language as well.
I think there may be more symptoms of this problem, those are just some scenarios that I found, but I guess they may have a common cause. Also, I don't know if this relates only to language filter, that's just what I used for testing.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the three search queries in the issue, comparing video and channel language results when each filter is present or absent. Trace the search query implementation and its existing tests, if any; done means whereVideo and whereChannel filter their respective results independently without changing the other result set.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, rust
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100