Expand my Community achievements bar.

Find Node by FileDataStore digest

Avatar

Level 3

Dear Experts,

in our FileDataStore I found a suspiciously large PNG image (several GB in size). Currently I am trying to find the corresponding node in the oak repository. I tried searching by dam:sha1, but without success:

SELECT * FROM [nt:base] WHERE [dam:sha1] LIKE '45ac32aa4c873131a981c938f62cb63a2ba48a17'

Could you please point me in the right direction?

Kind regards

Ivan

4 Replies

Avatar

Level 10

Can you find the node if you use other JCR SQL2 syntax. ie -

SELECT * FROM [nt:base] AS p WHERE [jcr:title] like '%<yourName>%'
  and ISDESCENDANTNODE('/content/<location>')

Avatar

Level 3

Dear Scott,

thanks for your response

Sad thing is, I don't know the jcr:title. The only thing I know is the file name with the blob content:

repository/datastore/45/ac/32/45ac32aa4c873131a981c938f62cb63a2ba48a17

Is there any possibility to find the reference to it?

Best regards

Ivan

Avatar

Level 10

I checked with some internal ppl. THey replied:

OOTB dam:sha1 is nit indexed he would need to use http://oakutils.appspot.com/generate/index and create an index like

  - compatVersion = 2

  - type = "lucene"

  - async = "async"

  - jcr:primaryType = oak:QueryIndexDefinition

  + indexRules

   + nt:base

    + properties

     + sha1

      - name = "dam:sha1"

      - propertyIndex = true

Avatar

Level 3

Unfortunately indexing didn't help to find the node. I suspect, it wasn't properly processed by DAM and does not have a sha1-Attribute.

Is there some more direct/low-level way to search directly by blobId?