mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix duplicate tags by using the name as the id
@ulfgebhardt: I wondered about the list of tags after importing the legacy db. It seems, each tag has at most 1 contribution. I guess it's because we create a unique id for each tag, so two tags with the same `name` e.g. `#hashtag` and `#hashtag` are not de-duplicated. I'm currently sitting in the train and cannot run the data import myself, could you double-check?
This commit is contained in:
parent
8a9d826e46
commit
ab7a4ffc3e
@ -20,6 +20,6 @@ MATCH (c:Category {id: categoryId})
|
||||
MERGE (p)-[:CATEGORIZED]->(c)
|
||||
WITH p, post.tags AS tags
|
||||
UNWIND tags AS tag
|
||||
MERGE (t:Tag {id: apoc.create.uuid(), name: tag})
|
||||
MERGE (t:Tag {id: tag, name: tag})
|
||||
MERGE (p)-[:TAGGED]->(t)
|
||||
;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user