jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Stein <nietsnit...@gmail.com>
Subject Re: Searching xml contents
Date Mon, 27 May 2013 06:03:47 GMT
Hi,
I think the JOIN could be a problem with this query.
I normally do a full-text search directly on the [nt:resource] nodes and
afterwards I invoke "getParent()" on the resulting nodes.
In my case the query looks something like this:
    SELECT * FROM [nt:resource] as res WHERE contains(res.*, 'aword')

Maybe this will improve the performance.

Regards
Martin

2013/5/25 Mansour Al Akeel <mansour.alakeel@gmail.com>

> Is there something that not clear, and prevented this question from being
> answered ?
>
> I just tried to change the query, to search only jcr:xmltext.
>
> SELECT parent.* FROM [nt:file] AS parent INNER JOIN [jcr:xmltext] AS child
> ON ISDESCENDANTNODE(child,parent) WHERE  CONTAINS(child.*,'aword')
>
>
> javax.jcr.query.InvalidQueryException: Selected node type does not exist:
> [jcr:xmltext] AS child
>     at
>
> org.apache.jackrabbit.core.query.lucene.join.QueryEngine.getNodeType(QueryEngine.java:589)
>     at
>
> org.apache.jackrabbit.core.query.lucene.join.QueryEngine.getSelectorNames(QueryEngine.java:571)
>     at
>
> org.apache.jackrabbit.core.query.lucene.join.QueryEngine.getSelectorNames(QueryEngine.java:577)
>     at
>
> org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:150)
>     at
>
> org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:130)
>     at
>
> org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngine.java:115)
>     at
>
> org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObjectModelImpl.java:129)
>     at
>
> org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObjectModelImpl.java:124)
>     at
>
> org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)
>     at
>
> org.apache.jackrabbit.core.query.QueryObjectModelImpl.execute(QueryObjectModelImpl.java:123)
>
>
>
> I really appreciate any help to solve this.
>
>
>
>
>
> On Wed, May 22, 2013 at 6:20 AM, Mansour Al Akeel <
> mansour.alakeel@gmail.com
> > wrote:
>
> > I am importing xml documents, by copying them through webdav. Then trying
> > to search for text in these documents. I am getting the query to work
> > properly, but it's slow. There's is only 38 files in this repository. The
> > query is taking about 600 ms.
> >
> > This is the query, searching for the word "data".
> >
> >
> > SELECT parent.* FROM [nt:file] AS parent INNER JOIN [nt:unstructured] AS
> > child ON ISDESCENDANTNODE(child,parent) WHERE  CONTAINS(child.*,'data')
> >
> >
> > when I copied the same files to another directory within the same repo
> > (increased the files count),
> > The query started taking on average 1.6 second.
> >
> > Is there anything wrong or places where I can improve the performance of
> > this search ??
> >
> > Thank you.
> >
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message