Add schema_version to main index mapping
All threads resolved!
All threads resolved!
Compare changes
Files
5+ 19
− 0
Related to #214601 (closed)
Adding schema_version
to index mapping for the main index (contains, project, wiki_blobs, and blob document types).
Note: We would like to have a schema_version
field available for future migrations in all document types.
This is prep work to be able to easily backfill traversal_ids
for projects which will be needed for the IndexIntegrityWorker
. The IndexIntegrityWorker
(dev in progress) will need to pull all projects for a root namespace and I need the traversal_ids
field populated for that. Currently it's only being populated for blobs and wiki_blobs.
N/A
setup Elasticsearch in gdk
config.rb
changesbundle exec rake gitlab:elastic:index
config.rb
changes)
GET http://localhost:9200/gitlab-development/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"type": {
"value": "project"
}
}
}
]
}
}
}
bundle exec rake gitlab:elastic:index
gdk stop rails-background-jobs
schema_version
field exists in the mappings: GET http://localhost:9200/gitlab-development/_mappings
Elastic::ProcessBookkeepingService.new.execute
schema_version
field exists and is populated for the project in the search response
GET http://localhost:9200/gitlab-development/_search
{
"query": {
"bool": {
"must": [
{
"term": {
"type": {
"value": "project"
}
}
}
]
}
}
}
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.