[
https://jira.nuxeo.org/browse/NXP-5284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=82473#action_82473
]
Florent Guillaume commented on NXP-5284:
----------------------------------------
Useful SQL commands to analyze the tag tables after migration:
-- remove spaces in tags
UPDATE tag SET label = REPLACE (label, ' ', ''); -- PostgreSQL REPLACE syntax
-- check duplicate tags
SELECT id, label FROM tag t
WHERE EXISTS(
SELECT COUNT(*) FROM tag tt WHERE LOWER(tt.label) = LOWER(t.label)
HAVING COUNT(*) > 1
)
ORDER BY lower(label);
-- -> 3cedd53b-a30c-4b01-95c7-1d7c7a978c26 | Courrier
-- -> deb2ae90-f626-4529-9ce6-4a0d0d7fd18b | courrier
-- deduplicate taggings
UPDATE relation SET target = '3cedd53b-a30c-4b01-95c7-1d7c7a978c26' WHERE
target = 'deb2ae90-f626-4529-9ce6-4a0d0d7fd18b';
-- clean unused tags
SELECT * FROM tag WHERE NOT EXISTS(SELECT 1 FROM relation WHERE target =
tag.id);
DELETE FROM tag WHERE NOT EXISTS(SELECT 1 FROM relation WHERE target = tag.id);
-- lowercase all tags now that there are no more dupes
UPDATE tag SET label = LOWER(label) WHERE label <> LOWER(label);
> Implement tags based on the core storage
> ----------------------------------------
>
> Key: NXP-5284
> URL: https://jira.nuxeo.org/browse/NXP-5284
> Project: Nuxeo Enterprise Platform
> Issue Type: New Feature
> Components: Core, Core SQL Storage, Tagging
> Reporter: Florent Guillaume
> Assignee: Florent Guillaume
> Priority: Major
> Fix For: 5.3.2
>
>
> Because the current tag implementation is based on a mix of Nuxeo Core and
> Hibernate, it's hard to make it efficient, and there are transaction/session
> problems when using Tomcat.
> -> Re-implement tags based on placeless documents managed by the Core, and a
> specialized QueryMaker for the queries that cannot be expressed in NXQL
> (aggregates and count for the popularity cloud).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets