Finding a document that needs deleting

cancel
Showing results for 
Search instead for 
Did you mean: 
PhilipLucas
Active Member

Finding a document that needs deleting

Jump to solution

Hi,

I have a file that has been picked up on testing server from an anti virus scan:

/mnt/Data1/alfresco/alf_data-S.../contentstore/2014/11/18/13/20/2cc71e6a-fa93-43f7-905d-f686231c0d2c.bin

I am trying to find it in the UI to delete it but having no luck. This instance is running version "Enterprise - v4.2.0 (.3 r60922-b49)".

I do not want to delete the file from the server directly as it may stop alfresco from starting up if not in sync with the database. Any suggestions would be much appreciated.

Thanks

1 Solution

Accepted Solutions
PhilipLucas
Active Member

Re: Finding a document that needs deleting

Jump to solution

Hi,

I was able to locate the node by doing a query against the alfresco database to find the node name which I could search within the UI:

SELECT
n.id as node_id,
aq.local_name as node_type,
npn.string_value as node_name,
ca.parent_node_id,
cu.content_size,
cu.content_url,
n.uuid,
n.audit_created
FROM alf_node as n
left outer 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'))
left outer 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'))
left outer join alf_content_data cd on (cd.id = npc.long_value)
left outer join alf_content_url cu on (cd.content_url_id = cu.id)
left outer join alf_child_assoc ca on (ca.child_node_id=n.id)
left outer join alf_qname aq on (n.type_qname_id=aq.id)
where
aq.local_name in ('folder','content')
and cu.content_url like '%2014/11/18/13/20/2cc71e6a-fa93-43f7-905d-f686231c0d2c.bin%'

Hope that helps some one else.

Thanks

View solution in original post

6 Replies
angelborroy
Alfresco Employee

Re: Finding a document that needs deleting

Jump to solution

You can find the document using the Node Browser.

Try following "fts-alfresco" query:

sys:node\-uuid:"2cc71e6a-fa93-43f7-905d-f686231c0d2c"
Hyland Developer Evangelist
afaust
Master

Re: Finding a document that needs deleting

Jump to solution

Note: This only works when SOLR is enabled and the node in question is indexed. There is no equivalent supported way to query the database via TMQ using FTS, only via CMIS QL by querying for

cmis:objectI

Also note: The UUID used in the query is the UUID of the content file on disk, and not the UUID of the node itself, so the query example will actually not find anything. It is not possible to query a node based on the UUID of the content file on disk, as the content URL is not indexed AFAIK and not usable in any TMQ query (FTS or CMIS QL)

PhilipLucas
Active Member

Re: Finding a document that needs deleting

Jump to solution

Thanks for getting back to me. I tried that search and unfortunately I didn't have any luck. It says no solr support for system store. Do I have any other options?

image.png

PhilipLucas
Active Member

Re: Finding a document that needs deleting

Jump to solution

Looks like that is the case, getting a No solr query support for system error when trying to do a fts-alfresco search.

PhilipLucas
Active Member

Re: Finding a document that needs deleting

Jump to solution

Hi,

I was able to locate the node by doing a query against the alfresco database to find the node name which I could search within the UI:

SELECT
n.id as node_id,
aq.local_name as node_type,
npn.string_value as node_name,
ca.parent_node_id,
cu.content_size,
cu.content_url,
n.uuid,
n.audit_created
FROM alf_node as n
left outer 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'))
left outer 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'))
left outer join alf_content_data cd on (cd.id = npc.long_value)
left outer join alf_content_url cu on (cd.content_url_id = cu.id)
left outer join alf_child_assoc ca on (ca.child_node_id=n.id)
left outer join alf_qname aq on (n.type_qname_id=aq.id)
where
aq.local_name in ('folder','content')
and cu.content_url like '%2014/11/18/13/20/2cc71e6a-fa93-43f7-905d-f686231c0d2c.bin%'

Hope that helps some one else.

Thanks

EddieMay
Alfresco Employee

Re: Finding a document that needs deleting

Jump to solution

Hi @PhilipLucas ,

Thanks for reporting back with your code snippet - should prove useful for other users.

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!