You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by pkrishna <pr...@ge.com> on 2009/11/02 20:57:01 UTC

Finding NodeName using SQL Query Analyzer

I want to know if it is possible to query for a particular NodeId in the
tables automatically generated by JackRabbit.

We have a customNode where the node name is an Id we generate. Let's call
this Node A. Node A has a child which is also a custom Node and this Node
has some custom properties we have defined. Lets call this Node B. Node B
has a property of type jcr:content. 

Is there a way for me to query the database for Node A using a where
criteria? Which table should I query against? Is this possible at all. 
-- 
View this message in context: http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26157796.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Search Index

Posted by Alexander Klimetschek <ak...@day.com>.
On Tue, Nov 3, 2009 at 00:49, Phukan, Anit <An...@intuit.com> wrote:
> Is there a way we can turn the Search Indexing off in Jackrabbit? If so,
> which is the configurable parameter and where can we configure that?

Simply remove the SearchIndex element from the configuration. See
http://jackrabbit.apache.org/jackrabbit-configuration.html

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Search Index

Posted by "Phukan, Anit" <An...@intuit.com>.
Hi,

Is there a way we can turn the Search Indexing off in Jackrabbit? If so,
which is the configurable parameter and where can we configure that?

Thanks
Anit


-----Original Message-----
From: Guo Du [mailto:mrduguo@gmail.com] 
Sent: Monday, November 02, 2009 12:56 PM
To: users@jackrabbit.apache.org
Subject: Re: Finding NodeName using SQL Query Analyzer

On Mon, Nov 2, 2009 at 7:57 PM, pkrishna <pr...@ge.com>
wrote:
> Is there a way for me to query the database for Node A using a where
> criteria? Which table should I query against? Is this possible at all.
You may have a look the ddl files in package
org.apache.jackrabbit.core.persistence.db. Different db have different
id implementation.

If you have the id, in theory you could query the node. But it doesn't
make too much sense as the data encoded as binary.

-Guo

Re: Finding NodeName using SQL Query Analyzer

Posted by Guo Du <mr...@gmail.com>.
On Mon, Nov 2, 2009 at 7:57 PM, pkrishna <pr...@ge.com> wrote:
> Is there a way for me to query the database for Node A using a where
> criteria? Which table should I query against? Is this possible at all.
You may have a look the ddl files in package
org.apache.jackrabbit.core.persistence.db. Different db have different
id implementation.

If you have the id, in theory you could query the node. But it doesn't
make too much sense as the data encoded as binary.

-Guo

Re: Finding NodeName using SQL Query Analyzer

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

On Wed, Nov 4, 2009 at 21:14, pkrishna <pr...@ge.com> wrote:
>
> I guess I was not clear enough on what I wanted; I do use createQuery
> programmatically to retrieve nodes from the repository. What I was after was
> for me to examine the existence of a particular node that is stored in
> repository using SQLDeveloper, for instance. The UUID we generate becomes
> the node Name. I just want to examine the existence of this node quickly
> using applications like SQLDeveloper, Aquadata etc. Our repository is an
> oracle database. I launch SQLDeveloper and traverse to the database. I see
> tables created by JackRabbit. They are entry-related, version-related,
> workspace-related. I was looking for a NodeId, for example, in CMSVER_NODE,
> CMSWKSP_NODE tables that matches the node name I am looking for. Even
> though, I know for sure such a node exists, I couldn't see it in
> SQLDeveloper.
>
> Is there a way do this? If so, which table should I be looking at.

no, it is not possible to look up a node by name using external SQL
tools. that information is serialized into a binary field in the
database. I suggest you use the regular JCR API.

regards
 marcel

>
> Marcel Reutegger wrote:
>>
>> Hi,
>>
>> 2009/11/2 pkrishna <pr...@ge.com>:
>>>
>>> I want to know if it is possible to query for a particular NodeId in the
>>> tables automatically generated by JackRabbit.
>>>
>>> We have a customNode where the node name is an Id we generate. Let's call
>>> this Node A. Node A has a child which is also a custom Node and this Node
>>> has some custom properties we have defined. Lets call this Node B. Node B
>>> has a property of type jcr:content.
>>>
>>> Is there a way for me to query the database for Node A using a where
>>> criteria? Which table should I query against? Is this possible at all.
>>
>> you should use the query mechanism defined by JCR.
>>
>> QueryManager qm = ...
>> Query q = qm.createQuery("select * from your:type where property =
>> 'value'", Query.SQL);
>> QueryResult result = q.execute();
>>
>> I'm not sure I understand your use case. maybe something like this
>> (using XPath syntax)?
>>
>> //element(*, type-of-node-A)[*/@jcr:content = 'some-value']
>>
>> though, jcr:content is usually the name of a child node of a nt:file node.
>>
>> so you'd rather want to do this?
>>
>> //element(*, type-of-node-A)[jcr:contains(*/jcr:content, 'foo')]
>>
>> regards
>>  marcel
>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26157796.html
>>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26203861.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

Re: Finding NodeName using SQL Query Analyzer

Posted by pkrishna <pr...@ge.com>.
I guess I was not clear enough on what I wanted; I do use createQuery
programmatically to retrieve nodes from the repository. What I was after was
for me to examine the existence of a particular node that is stored in
repository using SQLDeveloper, for instance. The UUID we generate becomes
the node Name. I just want to examine the existence of this node quickly
using applications like SQLDeveloper, Aquadata etc. Our repository is an
oracle database. I launch SQLDeveloper and traverse to the database. I see
tables created by JackRabbit. They are entry-related, version-related,
workspace-related. I was looking for a NodeId, for example, in CMSVER_NODE,
CMSWKSP_NODE tables that matches the node name I am looking for. Even
though, I know for sure such a node exists, I couldn't see it in
SQLDeveloper.

Is there a way do this? If so, which table should I be looking at.


Marcel Reutegger wrote:
> 
> Hi,
> 
> 2009/11/2 pkrishna <pr...@ge.com>:
>>
>> I want to know if it is possible to query for a particular NodeId in the
>> tables automatically generated by JackRabbit.
>>
>> We have a customNode where the node name is an Id we generate. Let's call
>> this Node A. Node A has a child which is also a custom Node and this Node
>> has some custom properties we have defined. Lets call this Node B. Node B
>> has a property of type jcr:content.
>>
>> Is there a way for me to query the database for Node A using a where
>> criteria? Which table should I query against? Is this possible at all.
> 
> you should use the query mechanism defined by JCR.
> 
> QueryManager qm = ...
> Query q = qm.createQuery("select * from your:type where property =
> 'value'", Query.SQL);
> QueryResult result = q.execute();
> 
> I'm not sure I understand your use case. maybe something like this
> (using XPath syntax)?
> 
> //element(*, type-of-node-A)[*/@jcr:content = 'some-value']
> 
> though, jcr:content is usually the name of a child node of a nt:file node.
> 
> so you'd rather want to do this?
> 
> //element(*, type-of-node-A)[jcr:contains(*/jcr:content, 'foo')]
> 
> regards
>  marcel
> 
>> --
>> View this message in context:
>> http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26157796.html
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26203861.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Re: Finding NodeName using SQL Query Analyzer

Posted by Marcel Reutegger <ma...@gmx.net>.
Hi,

2009/11/2 pkrishna <pr...@ge.com>:
>
> I want to know if it is possible to query for a particular NodeId in the
> tables automatically generated by JackRabbit.
>
> We have a customNode where the node name is an Id we generate. Let's call
> this Node A. Node A has a child which is also a custom Node and this Node
> has some custom properties we have defined. Lets call this Node B. Node B
> has a property of type jcr:content.
>
> Is there a way for me to query the database for Node A using a where
> criteria? Which table should I query against? Is this possible at all.

you should use the query mechanism defined by JCR.

QueryManager qm = ...
Query q = qm.createQuery("select * from your:type where property =
'value'", Query.SQL);
QueryResult result = q.execute();

I'm not sure I understand your use case. maybe something like this
(using XPath syntax)?

//element(*, type-of-node-A)[*/@jcr:content = 'some-value']

though, jcr:content is usually the name of a child node of a nt:file node.

so you'd rather want to do this?

//element(*, type-of-node-A)[jcr:contains(*/jcr:content, 'foo')]

regards
 marcel

> --
> View this message in context: http://old.nabble.com/Finding-NodeName-using-SQL-Query-Analyzer-tp26157796p26157796.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>