jcr-sql2

Node Identifier of copied node in Jackrabbit not found while deleting

一个人想着一个人 提交于 2019-12-11 09:16:28
问题 I copied a node in Jackrabbit using session.getWorkspace().copy(sourceNode.getPath(), destinationNode.getPath()) This operation changes are persisted instantly as far as I know. But when I tried to get the copied node for deleting it using session.getNodeByIdentifier("nodeId of copied node") , it gives ItemNotFoundException. The reason for that error is that the copied node loses is mix:referenceable property during copy which causes getNodeByIdentifier to fail. The question is how do I set

Recursive search in JCR repo via java

寵の児 提交于 2019-12-11 04:24:52
问题 I know how to search for something in the JCR via JCR SQL2 queries. However, I would like to use Java in certain cases, using the JCR API: javax.jcr.Node , javax.jcr.NodeIterator and the like. I'm afraid I will simply reinvent the wheel by coding my own. Is there anything already available ( Gist , Github or else )? 回答1: You can use for that SlingQuery. It's inspired by jQuery and follows it's syntax. You should use it only to search small number of nodes (in best case under 100), because

JCR-SQL - contains function doesn't escape special characters?

ⅰ亾dé卋堺 提交于 2019-12-10 22:52:11
问题 I have the following query string: SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '/content/.../%' AND CONTAINS (., '*') ORDER BY date ASC The problem is that the query is returning all nodes from the given path even though they don't have asterisk in any proeprty. I wanted to escape the asterisk character, but the result is the same. I've tried something like this: SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '

ranked full text search results using Lucene with modeshape

独自空忆成欢 提交于 2019-12-06 07:23:34
问题 I'm trying to get full-text search working with modeshape. I'm particularly interested in ranked results based on lucene index. Here is my repository configuration "indexProviders": { "lucene": { "classname": "lucene", "directory": "${user.home}/repository/indexes" } }, "indexes": { "textFromFiles": { "kind": "text", "provider": "lucene", "nodeType": "nt:resource", "columns": "jcr:data(BINARY)" } }, I noticed a lucene index created at the specified location. I added 10-15 filesc with varied

ranked full text search results using Lucene with modeshape

帅比萌擦擦* 提交于 2019-12-04 14:28:14
I'm trying to get full-text search working with modeshape. I'm particularly interested in ranked results based on lucene index. Here is my repository configuration "indexProviders": { "lucene": { "classname": "lucene", "directory": "${user.home}/repository/indexes" } }, "indexes": { "textFromFiles": { "kind": "text", "provider": "lucene", "nodeType": "nt:resource", "columns": "jcr:data(BINARY)" } }, I noticed a lucene index created at the specified location. I added 10-15 filesc with varied number of occurrence of search term into repository, and tried searching using some words. I am printing

JCR SQL2 - result query order as in JCR browser

蹲街弑〆低调 提交于 2019-11-29 11:37:33
I use an application where we can manipulate JCR nodes, typically you would rename, remove, delete, or else move them. Using the JCR API, I can access the nodes in my repository and return a set of nodes in the same order as they are in the JCR. I would like to be able to do the same using the JCR SQL2 queries. I have not found anything about this & now start to believe this is not possible. For instance, if I have a JCR tree such as: parentNode |_childNode1 |_childNode2 |_childNode3 |_childNode4 When querying using the JCR SQL2 it would return them in an order different from: childNode1,

Apache Jackrabbit JCA 2.7.5 .docx and .xlsx indexing

烂漫一生 提交于 2019-11-29 05:31:12
I'm ussing the Appache Jackrabbit JCA 2.7.5, the problem is that files .docx and .xlsx is not indexed. My steps : Deploy the Jackrabbit JCA as resource adapter on glassfish create a Connector Connection Pool for the resource adapter indicating the ConfigFile=path/to/the/repository.xml and HomeDir=path/to/the //miss the repository.xml create a Connector Resources for the connector pool (the jndi) create web application create class to get session from the connector ressources (code below) import java.io.Serializable; import java.net.MalformedURLException; import javax.annotation.Resource;

JCR SQL2 - result query order as in JCR browser

谁都会走 提交于 2019-11-28 04:56:10
问题 I use an application where we can manipulate JCR nodes, typically you would rename, remove, delete, or else move them. Using the JCR API, I can access the nodes in my repository and return a set of nodes in the same order as they are in the JCR. I would like to be able to do the same using the JCR SQL2 queries. I have not found anything about this & now start to believe this is not possible. For instance, if I have a JCR tree such as: parentNode |_childNode1 |_childNode2 |_childNode3 |

Apache Jackrabbit JCA 2.7.5 .docx and .xlsx indexing

无人久伴 提交于 2019-11-27 23:04:36
问题 I'm ussing the Appache Jackrabbit JCA 2.7.5, the problem is that files .docx and .xlsx is not indexed. My steps : Deploy the Jackrabbit JCA as resource adapter on glassfish create a Connector Connection Pool for the resource adapter indicating the ConfigFile=path/to/the/repository.xml and HomeDir=path/to/the //miss the repository.xml create a Connector Resources for the connector pool (the jndi) create web application create class to get session from the connector ressources (code below)