Marcel Reutegger | 1 Dec 09:59 2006
Picon
Picon

Re: RowIterator loop is slow?

dan wrote:
> All at once? I thought the Lucene search would return a set of Node UUIDs or
> something similar. Then the reading of actual Rows/Nodes from the result is
> incremental (by smaller chunks). 

well, depending on the query you have and the configuration it may happen that 
all result nodes are read at once. if your query does not have an 'order by' 
clause AND the query handler configuration uses the default value for the 
'respectDocumentOrder' parameter. In that case there is a post processing in the 
query result which orders the result nodes in document order.

If you have an 'order by jcr:score()' OR if you set the 'respectDocumentOrder' 
to false the query result will read the nodes on demand from persistent storage 
when you request them through either Row- or NodeIterator.

>> does the performance improve when you look again through the entries?
> 
> Yes, I saw a slight improvement. But still around 3 seconds. 

Try changing the configuration to respectDocumentOrder=false.

regards
  marcel

Angela Schreiber | 1 Dec 10:31 2006

Re: Webdav SearchMethod and xpath query

hi darren

there exists a example in the SPI contribution, that
uses the search-functionality exposed by the SearchResourceImpl
in o.a.j.webdav.jcr.SearchResourceImpl.java (thus the jcr
remoting server implementation). and this one works for SQL
and XPath queries.

do you have your own implementation of the SearchResource?
and: are you sure, your implementation understands that

{http://www.day.com/jcr/webdav/1.0}xpath

must be converted to the javax.jcr.query.Query.XPATH constant,
in order to be able to build a valid Query object?

regards
angela

below some conversation fragments from my test (which i performed
on my current checkout from trunk and not on the 1.1 branch. but
the code doesn't differ in the relevant parts.

Request -------------------------------------------------------------

OPTIONS /jackrabbit/server/default HTTP/1.1
Host: localhost:5502

Response -------------------------------------------------------------

(Continue reading)

Abbas Yousafzai | 1 Dec 13:09 2006
Picon

Expire Content/Node

Hello.

I was wondering if it is possible to automatically expire a node
automatically by setting a property. I searched through the entire API but
was unable to find any such functionality.

Thanks,
Abbas Yousafzai.
Darren Hartford | 1 Dec 15:11 2006

RE: Webdav SearchMethod and xpath query

I'm not aware of the SPI contribution, I've just been working with what
is available within the 1.1 Jackrabbit release. I haven't taken a look,
but would the SPI contribution work with MS clients as well (VB, VBA,
.NET)?  

Based on what you provided back, I did make some changes that seemed to
have shown progress.

*SearchMethod smethod = new SearchMethod(mypath,query,
javax.jcr.query.Query.XPATH);

And on the query itself removed the day.com namespace:

String schreibquery="<D:searchrequest xmlns:D=\"DAV:\">" +
"<xpath>//element(*,rep:root)</xpath>" +
"</D:searchrequest>";

String modquery="<D:searchrequest xmlns:D=\"DAV:\">" +
"<xpath>//sv:node[ <at> sv:name='jcr:root']</xpath>" +
"</D:searchrequest>";

The new error is:

*"Number of location steps must be > 0"

-D

> -----Original Message-----
> From: Angela Schreiber [mailto:anchela <at> day.com] 
> Sent: Friday, December 01, 2006 4:31 AM
(Continue reading)

dan | 1 Dec 15:54 2006
Picon

RE: RowIterator loop is slow?

Thanks Marcel,

> if your query does not have an 'order by' clause AND the query handler 
> configuration uses the default value for the
> 'respectDocumentOrder' parameter. In that case there is a post processing
> in the query result which orders the result nodes in document order.

That explains why it was slow for me - I have "order by  <at> my:propname" in the
query, although I've already set "respectDocumentOrder" to false.

Now I feel somewhat agree with the idea in theads a few days back, about
"expanding RDB schema" and "if using RDB repository, let RDB do all
queries". 

IMO, "order by NOT_JUST_jcr:score" is very common use case. The way that
retrieving all nodes from multiple BLOBs into Java objects and then do Java
sorting, won't have any performance advantage over that allowing RDB to
handle everything in one shot. 
Also, many RDB products now have full-text search capability, although they
may not be as great as Lucene. When considering the 'over-all' performance,
it might be legitimate to think about a "RDB oriented search/query
mechanism". 

Of course, that may fall beyond the scope of Jacarabbit, as a reference impl
of JCR.

Thanks again & 
Best regards,
Dan

(Continue reading)

Michael Neale | 1 Dec 16:03 2006
Picon

Re: modify a node type definition

Thanks Jukka.
When you say "don't use versioning" - can I use versioning in the "source"
repo, but dump it out without the history?

On 11/30/06, Jukka Zitting <jukka.zitting <at> gmail.com> wrote:
>
> Hi,
>
> On 11/30/06, Michael Neale <michael.neale <at> gmail.com> wrote:
> > So any hints on how best to design things to make "migration" as easy as
> > possible in future? any magic tricks?
>
> Good question. Some rules of thumb:
>
> * When developing your application, use an XML import or a simple
> builder application to set up your test content. This way you can
> easily scrap the entire test repository, make any modifications (node
> type changes, etc.) you need, and then recreate the test repository
> without worrying about migrating existing content.
>
> * Avoid putting things directly below the root node. Use a top-level
> node like /my:root or /my:content and place all your application
> content under that. This way you can easily export/import content
> using the standard XML mappings without having to worry about the
> protected /jcr:system subtree.
>
> * If your have lots of content, then you should structure it so that
> you can export and import it in smaller pieces. If you use references,
> make sure that you can import the parts being referenced before the
> referencing parts.
(Continue reading)

Jukka Zitting | 1 Dec 16:08 2006
Picon

Re: modify a node type definition

Hi,

On 12/1/06, Michael Neale <michael.neale <at> gmail.com> wrote:
> When you say "don't use versioning" - can I use versioning in the "source"
> repo, but dump it out without the history?

Yes. If you don't need the version histories in the target repository,
then there's no need to avoid versioning.

BR,

Jukka Zitting

Marcel Reutegger | 1 Dec 16:21 2006
Picon
Picon

Re: RowIterator loop is slow?

dan wrote:
> IMO, "order by NOT_JUST_jcr:score" is very common use case. The way that
> retrieving all nodes from multiple BLOBs into Java objects and then do Java
> sorting, won't have any performance advantage over that allowing RDB to
> handle everything in one shot. 

The expensive sorting is only done when document order is requested. order by 
jcr:score() was just an example. If you order by any other property lucene will 
do the sorting as well, just like ordering by score.

Can you give more details where those 3 seconds are spent? I'd be interested to 
know how much time is spent in:

- Query.execute()
- QueryResult.getRows()
- RowIterator.nextRow()

regards
  marcel

dan | 1 Dec 16:57 2006
Picon

RE: RowIterator loop is slow?


> Can you give more details where those 3 seconds are spent? I'd be
> interested to

The query is in SQL: 
SELECT Source FROM cm:document WHERE jcr:path LIKE '/cm:contentRoot/CCD/%'
AND cm:state='published' AND  (flag3='2'  OR flag3='1' )   AND
(Source='640'  OR Source='240'  OR Source='220'  OR Source='130'  OR
Source='160'  OR Source='020'  OR Source='630'  OR Source='760'  OR
Source='050'  OR Source='730'  OR Source='190'  OR Source='230'  OR
Source='360'  OR Source='530'  OR Source='040'  OR Source='330'  OR
Source='720'  OR Source='750'  OR Source='390'  OR Source='540'  OR
Source='280'  OR Source='110'  OR Source='580'  OR Source='620' )   AND
(category1='090'  OR Category1='150'  OR Category1='130'  OR Category1='160'
OR Category1='020'  OR Category1='060'  OR Category1='050'  OR
Category1='140'  OR Category1='040'  OR Category1='010'  OR Category1='080'
OR Category1='110'  OR Category1='030'  OR Category1='070'  OR
Category1='100'  OR Category1='120' )   ORDER BY Source

NodeType cm:document has properties "Source", "Category1" whose values equal
to other category nodes' values. (I can't use references because I need to
query on these multiple values to filter documents, which is not supported
in current JCR if node reference is used).

And here is the result (Extracted from the Log4j output):
- Query.execute(): 9375-7484 = 1891ms
- QueryResult.getRows(): less than 1 ms
- RowIterator.nextRow(): 13234-9375 = 3859ms

***********************************
(Continue reading)

Torgeir Veimo | 1 Dec 17:21 2006
Picon

multivalue problem

I've got a node type def like this;

[nen:protected] > mix:referenceable mixin orderable
- nen:owner (string) mandatory multiple
+ nen:ace(nen:ace)=nen:ace multiple

I've verified that this definition is in fact effective in the
repository;

Properties for
node /jcr:system/jcr:nodeTypes/nen:protected/jcr:propertyDefinition 

name type value
jcr:autoCreated boolean false 
jcr:defaultValues string [MV] 
jcr:mandatory boolean true 
jcr:mixinTypes name [MV] 
jcr:multiple boolean true 
jcr:name name nen:owner 
jcr:onParentVersion string COPY 
jcr:primaryType name nt:propertyDefinition 
jcr:protected boolean false 
jcr:requiredType string STRING 
jcr:valueConstraints string [MV]

But when I try to save such a node, I get the exception;

16:11:12,930 ERROR - unable to save resource; 
javax.jcr.ValueFormatException: /jcr:content/pages/groups/alumni/isk/nen:owner is not multi-valued
        at
(Continue reading)


Gmane