【问题标题】:How to list information about all Alfresco's files (Postgres SQL)?如何列出有关所有 Alfresco 文件(Postgresql)的信息?
【发布时间】:2016-12-14 14:01:28
【问题描述】:

Alfresco 持久层中的文件节点表示:

  • 内容存放在ALFRESCO_HOME\alf_data\contentstore\文件夹中
  • 元数据存储在relational database(默认:PostgreSQL)
  • 文本搜索信息(Lucene)存储在 Solr 的文档数据库中

哪些 Postgres 表用于保存新上传文件的元数据? 如何列出所有 Alfresco 文件的信息(Postgres SQL)?

【问题讨论】:

  • 数据库模式是内部的——你不应该直接点击它。
  • 我知道,但是我需要导出一千万个Alfresco的文件列表(名称、路径、大小),以确保所有文件都已导入。

标签: postgresql alfresco


【解决方案1】:

保存文件元数据的表:

列出所有 Alfresco 文件的信息 - Postgres SQL:

SELECT 
  n.id, 
  npn.string_value as filename,
  cu.content_size,
  cu.content_url,   
  n.uuid, 
  n.audit_created
FROM alf_node as n
  join alf_node_properties npn on 
     (npn.node_id=n.id and npn.actual_type_n=6 and npn.qname_id in 
       (select id from alf_qname where local_name='name'))
  join alf_node_properties npc on 
     (npc.node_id=n.id and npc.actual_type_n=21 and npc.qname_id in 
       (select id from alf_qname where local_name='content'))
  join alf_content_data cd on (cd.id = npc.long_value)
  join alf_content_url cu on (cd.content_url_id = cu.id)
where 
  n.type_qname_id in (
    select id from alf_qname where local_name='content'
  )

【讨论】:

    猜你喜欢
    • 2023-03-19
    • 1970-01-01
    • 2011-11-23
    • 2016-05-30
    • 1970-01-01
    • 2016-12-11
    • 1970-01-01
    • 2013-01-13
    • 1970-01-01
    相关资源
    最近更新 更多