internetarchive / internetarchive/openlibrary

Works sometimes show up twice in a QueryCarousel that calls a subject tag

Open
#5,731 1 comment 1 reaction 0 assignees View on GitHub
Lead: @mekarpeles Priority: 3 Type: Bug
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 19h
Merged PRs (30d)
138

Description

In the [LGBTQ collection](https://openlibrary.org/collections/LGBTQ), we're using QueryCarousels searching by subject. Sometimes a work will show up twice in the results. This has happened more than once in different, unrelated carousels.

### Evidence / Screenshot (if possible)

![spirit](https://user-images.githubusercontent.com/85025703/136054502-5a0e7a75-10ba-4f2b-8855-da73ea7f78ab.png)

### Relevant url?

https://openlibrary.org/collections/LGBTQ

### Steps to Reproduce

1. Go to the [LGBTQ collection](https://openlibrary.org/collections/LGBTQ).
2. Wait 10+ seconds for the page to load. If this bothers you, please see #5728.
2. Scroll down to the [LGBTQ sociology carousel](https://openlibrary.org/collections/LGBTQ#lgbtq_sociology).
3. Click the right arrow to "load more" three times.

* Actual: The work Spirit in the Flesh shows up twice, but links to the same work id. It appears to be a total duplicate.
* Expected: The work Spirit in the Flesh should only show up once.

### Details

- **Logged in (Y/N)?** both
- **Browser type/version?** Firefox 91.0.2 for Mint
- **Operating system?** Linux Mint 20
- **Environment (prod/dev/local)?** prod, testing

### Proposal & Constraints

It's possible this was two works that were both given the LGBTQ sociology subject separately, then merged later? I'm not sure.

Is it possible to have the macro do a uniqueness check on work ids before returning the results?

### Related files

### Stakeholders
@libjenner

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.