What will be the oak:index structure for following query

Avatar

Avatar

vasim_akram_sha

Avatar

vasim_akram_sha

vasim_akram_sha

19-01-2019

Hi All,

What will be the oak:index structure for the following xpath query

/jcr:root/content/dam/temp//element(*, nt:folder)

[

(jcr:content/@metadataSchema = '/conf/global/settings/dam/adminui-extension/metadataschema/temp')

]

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Gaurav-Behl

MVP

Avatar

Gaurav-Behl

MVP

Gaurav-Behl
MVP

19-01-2019

Try this-

  - compatVersion = 2

  - async = "async"

  - jcr:primaryType = oak:QueryIndexDefinition

  - evaluatePathRestrictions = true

  - type = "lucene"

  + indexRules

   + nt:folder

    + properties

     + metadataSchema

      - name = "jcr:content/metadataSchema"

      - propertyIndex = true

If you want this index to be picked up only for that path/query then include queryPaths/includedPaths or make it a non-root index

Jackrabbit Oak – Lucene Index

Answers (2)

Answers (2)

Avatar

Avatar

Premkarthic-7WP

Avatar

Premkarthic-7WP

Premkarthic-7WP

19-01-2019

Hi,

For any custom queries you can use this tool "Oak Utilities : Index Definition Generator" to check how your index definition will appears.

Hope this helps !

Thanks

Prem

Avatar

Avatar

vasim_akram_sha

Avatar

vasim_akram_sha

vasim_akram_sha

19-01-2019

Thanks gaurav. It is working as expected.