jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiaojie Shen <Xiaojie.S...@cybercomgroup.com>
Subject RE: Jackrabbit SearchMethod - status code 207 but null response
Date Wed, 23 Jun 2010 14:40:22 GMT
Alex, thanks for the reply.

I guess SearchMethod does get something since the length of response content changes a lot
for different queries. However I can neither get response body nor query body. Is there some
other way to get search result?

This is how I tried to see the response body and query body:

if (searchMethod.succeeded()){		    	  
	String q = searchMethod.getQueryString();
	String resp = searchMethod.getResponseBodyAsString();
	long length = searchMethod.getResponseContentLength();		      
	System.out.println("query String: " + q + " response: " + resp + 
	  " length: " + safeLongToInt(length));
}

These are queries that I tried:

query = "//element(*, nt:file)";

search method is allowed
query String: null response: null length: 81047
statusCode 207
text Multi-Status

---

query = "//element(*, nt:base)";

search method is allowed
query String: null response: null length: 507120
statusCode 207
text Multi-Status

---

query = "//element(*, nt:unstructured)";

search method is allowed
query String: null response: null length: 854
statusCode 207
text Multi-Status


BR
Shen

-----Original Message-----
From: Alexander Klimetschek [mailto:aklimets@day.com] 
Sent: den 23 juni 2010 16:00
To: dev@jackrabbit.apache.org
Subject: Re: Jackrabbit SearchMethod - status code 207 but null response

On Wed, Jun 23, 2010 at 15:26, Xiaojie Shen
<Xiaojie.Shen@cybercomgroup.com> wrote:
>                   String query = "//sv:node[@sv:name='jcr:root']";

This looks like the system view export XML. However, Xpath queries in
JCR work based on the plain document view mapping. Examples would be

//element(*, nt:file)
to find all file nodes

/jcr:root
to select the root node

For more information, see here
http://wiki.gxdeveloperweb.com/confluence/display/GXDEV/XPath+JCR+Sample+Queries

or the JCR 1.0 spec, section 6.6
http://www.day.com/specs/jcr/1.0/

or search the mailing list archives
http://jackrabbit.markmail.org/

Regards,
Alex

-- 
Alexander Klimetschek
alexander.klimetschek@day.com

Mime
View raw message