If you upload content to a repository repeatedly within 5 minutes, only 1 item gets created
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1115089
Description of problem:
If you upload 2+ puppet modules within 5 minutes and then do a content search, it'll only show 1 of the total number uploaded. The problem is that ElasticSearch is only pulling in a single item of the last 5 minutes. A workaround is to reindex. The content is stored properly in Pulp, it's just not indexed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Create a puppet repo
2. Upload 2+ puppet modules
3. Click on the number of puppet modules on the same page to go to the content search.
You only see 1 puppet module.
You should see 2+ puppet modules.
Fixes #6457,BZ1115089 - Match multiple items on contents changed
The problem when uploading multiple items is that we were doing a unit search
that could have multiple results but we were only looking at the first one. We
need to get the ids of all.