nusmodifications / nusmodifications/nusmods
Elasticsearch indexing does not include the numeric code only
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 689
- Forks
- 364
- Avg merge
- 7h 5m
- Merged PRs (30d)
- 14
Description
Describe the bug
Elasticsearch indexing currently allows for fuzzy matching, but does not match the numeric code only. E.g. for module ST2334, Elasticsearch matches for "S2334" and "T2334", but fails to match for "2334".
To Reproduce
Steps to reproduce the behavior:
- Go to
/courses - In the search box, type "2334".
- You will see "No results found for 2334."
Expected behavior
I suggest an improvement to allow Elasticsearch to index by the numeric code as well.
Additional context
This may require reindexing modules_v2 after the fix in order for Elasticsearch to update its indexing.
Contributor guide
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 at the /courses search flow and trace the Elasticsearch indexing and query configuration for modules_v2. Reproduce the missing numeric-only match with module ST2334, then verify that searching "2334" returns it and determine whether modules_v2 must be reindexed after the change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- elasticsearch, javascript
- Domain
- backend, search
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100