Elasticsearch v6 - migrate from parent/child relationships to joins
What does this MR do?
Since ES6 only allows one mapping type per index and we need to have documents in a single index in order to use join datatypes, I had to make quite a few changes to how we deal with elasticsearch in the codebase:
- I changed all our document types to be
- In order to still be able to query per type, I implemented a custom type field in our elasticsearch documents, called simply
- The join type was created granularly, that is to say, it has a mapping per type: project->issue, project->blob, etc.
- We now use an
_idfield. This is comprised of the model class name and the ID in the database
- Because of the
es_idchange a lot of changes were required to the
elasticsearch-modelgem. These changes have been encapsulated in the
ee/lib/gem_extensionsfolder and are injected inside the elasticsearch client initializer.
We can no longer support Elasticsearch versions under
5.6. This is because the
join field is only supported from versions 5.6 and upwards.
Wiki searches now must use a new type:
wiki_blob. I've edited existing usages in the codebase but this is good to keep in mind
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
- Changelog entry added, if necessary
- Documentation created/updated
- Tests added for this feature/bug
- Conforms to the code review guidelines
- Conforms to the merge request performance guidelines
- Conforms to the style guides
- Conforms to the database guides
EE specific content should be in the top level
- For a paid feature, have we considered GitLab.com plans, how it works for groups, and is there a design for promoting it to users who aren't on the correct plan?
Closes #4218 (closed)