Elasticsearch: group search not working on staging.gitlab.com
Summary
We're testing our elasticsearch integration on staging.gitlab.com , and have indexed the gitlab-org
group to do so.
An oddity is that although project search is working fine, group search is failing to return any results.
Steps to reproduce
Example Project
Example project search: https://staging.gitlab.com/search?utf8=%E2%9C%93&snippets=&scope=&search=PostReceive&project_id=13083
Example group search: https://staging.gitlab.com/search?utf8=%E2%9C%93&snippets=&scope=blobs&search=PostReceive&group_id=9970
What is the current bug behavior?
The project above (gitlab-org/gitlab-ce
) is in the gitlab-org
group, and correctly returning results for the PostReceive
string. However, when searching at the group level, none of those results are visible.
What is the expected correct behavior?
All the project's search results should also be visible at group level
Output of checks
This bug happens on [staging.]GitLab.com
Possible fixes
My first suspicion was that, at group level, we're constructing the parent IDs incorrectly in the query. This would break group source for everyone. HOWEVER. I can't replicate this locally, which suggests it's not a bug that uniformly affects all our customers. Instead, it's more likely to be some interaction of conditions on staging.gitlab.com
.
I tried indexing locally with both the Go and Ruby code indexers. In both cases, I could find results at the group level. So it's not a bug in one of those vs. the other.
One thing I've noticed is that, even at project level, no other search results are being returned. All we can get are commits and blobs. To me, this strongly suggests that the database-level content has not been indexed.
At group level, we use join relations to connect the blob / commit documents to a list of project IDs. Perhaps the issue is that this hasn't happened at all, or has happened in a "wrong order" somehow?
@mwasilewski-gitlab did you set up indexing on staging.gitlab.com ? Can you walk me through the exact steps you took to get it set up, if so?