openlibhums / openlibhums/janeway
Duplicates in site search
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 239
- Forks
- 97
- Avg merge
- 9d 1h
- Merged PRs (30d)
- 8
Description
Describe the bug
A clear and concise description of what the bug is.
There are some duplicate search results around redirected URLs. For example:
- /site/plugins/supporters/referrals/codes/#library-partnership-fees
- /site/consortium/#library-partnership-fees
- /site/for-librarians-consortia/#library-partnership-fees <-- the correct one
Janeway version
1.5.2
Expected behavior
A single seaerch result per piece of unique content
Proposed solution
Add the requests.response.url to the fetched_urls, in addition to the requested URL, here:
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
Read src/cms/logic.py around lines 210-215 and trace how requested and redirected URLs enter fetched_urls. Reproduce the example search using the three listed URLs; done means redirected URLs no longer create duplicate results and one result remains for each piece of unique content.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- search
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100