mesh
mesh copied to clipboard
Tag search index project scope issue
If i create a tag and and tag familly, and search it by endpoint /api/v2/search/tags
:
{
"query": {
"bool": {
"must": [
{
"query_string": {
"query": "name.raw: state-archive AND tagFamily.name.raw: state"
}
}
]
}
}
}
i get 1 result :
{
"data": [
{
"uuid": "b06a217939f14810aa217939f188106e",
"creator": {
"uuid": "b05b061fc9f544079b061fc9f58407ec"
},
"created": "2019-09-11T09:01:54.051Z",
"editor": {
"uuid": "b05b061fc9f544079b061fc9f58407ec"
},
"edited": "2019-09-11T09:01:54.051Z",
"tagFamily": {
"name": "state",
"uuid": "068b5e47be3045138b5e47be3005136f"
},
"name": "state-archive",
"permissions": {
"create": true,
"read": true,
"update": true,
"delete": true
}
}
],
"_metainfo": {
"currentPage": 1,
"perPage": 10,
"pageCount": 1,
"totalCount": 1
}
}
which is fine if i create another project and call sync endpoint i get two result for the same request (tag is only attached to the first project, not the second one)
{
"data": [
{
"uuid": "b06a217939f14810aa217939f188106e",
"creator": {
"uuid": "b05b061fc9f544079b061fc9f58407ec"
},
"created": "2019-09-11T09:01:54.051Z",
"editor": {
"uuid": "b05b061fc9f544079b061fc9f58407ec"
},
"edited": "2019-09-11T09:01:54.051Z",
"tagFamily": {
"name": "state",
"uuid": "068b5e47be3045138b5e47be3005136f"
},
"name": "state-archive",
"permissions": {
"create": true,
"read": true,
"update": true,
"delete": true
}
},
{
"uuid": "b06a217939f14810aa217939f188106e",
"creator": {
"uuid": "b05b061fc9f544079b061fc9f58407ec"
},
"created": "2019-09-11T09:01:54.051Z",
"editor": {
"uuid": "b05b061fc9f544079b061fc9f58407ec"
},
"edited": "2019-09-11T09:01:54.051Z",
"tagFamily": {
"name": "state",
"uuid": "068b5e47be3045138b5e47be3005136f"
},
"name": "state-archive",
"permissions": {
"create": true,
"read": true,
"update": true,
"delete": true
}
}
],
"_metainfo": {
"currentPage": 1,
"perPage": 10,
"pageCount": 1,
"totalCount": 2
}
}
Seems that sync is broken for tag when there is more than 1 project index twice to ES the same tag