jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angela Schreiber <anch...@day.com>
Subject Re: SQL example to replace basicsearch
Date Wed, 29 Nov 2006 10:06:37 GMT
hi darren

since i'm neither expert for the DASL basicsearch nor for
the query languages defined by JSR170, i can't help you
with the conversion.

the reason why no utilities for the DAV:basicsearch
is available:

- up to now, we needed the webDAV SEARCH for the remoting
   purpose only. therefore, i was looking for a possibility to
   transport a jsr170 query
- consequently, there was no need to convert the query statement
   from XPath/SQL to DAV:basicsearch grammer and back.

however, for the limited usage of the internet-search-protocol
we had, i tried to be close the draft:

- DAV:searchrequest contains a single child element specifying
   the query language to be used.
   quote from the draft:
   "For DAV:searchrequest, the definition of search criteria, the result 
record, and any other details needed to perform the search depend on the 
individual search grammar."

- For me passing the query statement as text element inside the
   single child-element of the DAV:search-request, seems quite
   natural.

- in contrast, building the multistatus response to respond
   to the SEARCH request, may depend on your dav implementation
   on top of the JCR repository:

   for a 'common' webdav server focusing on 'files and folders'
   (such as e.g. the simple server), the query-result returned
   from the JSR170 api would possibly need some adjustment, since
   the matching nodes may represent some internal child node
   of structure, that gets exposed as resource in the webdav view.

kind regards
angela


Darren Hartford wrote:
> Or a SQL equivalent through the <searchrequest> mechanism.  The
> JCRSQLQueryBuilder and the tests seem to be oriented towards the JCR
> API, so can not find an example of going through HTTP with
> <searchrequest>. 
> 
> 
>>-----Original Message-----
>>From: Darren Hartford [mailto:dhartford@ghsinc.com] 
>>Sent: Tuesday, November 28, 2006 10:37 AM
>>To: users@jackrabbit.apache.org
>>Subject: Xpath example to replace basicsearch
>>
>>If basicsearch is not working, can someone help with an 
>>example of what an equivalent xpath query would be?
>>
>>Old DASL basicsearch query:
>>
>>String queryssn = "<D:searchrequest xmlns:D=\"DAV:\">" +
>>"  <D:basicsearch xmlns:F=\"FAX\">" +   
>>"<D:select>" +
>>"<D:allprop/>" +
>>"</D:select>" +
>>"<D:from>" +
>>"           <D:scope>" +
>>"              <D:href>/slide/files/</D:href>" +
>>"               <D:depth>infinity</D:depth>" +
>>"           </D:scope>" +
>>"       </D:from>" +
>>"       <D:where>" +
>>"           <D:eq>" +
>>"               <D:prop><F:ORIGINNUMBER/></D:prop>" +
>>"               <D:literal>555-555-5555</D:literal>" +
>>"           </D:eq>" +
>>"       </D:where>" +
>>"   </D:basicsearch>" +
>>"</D:searchrequest>";
>>
>>Looking at the SearchInfo class, below is the basic example 
>>-- but I don't know how to convert the above to an equivalent:
>>
>>String jackrabbitquery=
>>"<d:searchrequest xmlns:d=\"DAV:\"
>>dcr:=\"http://www.day.com/jcr/webdav/1.0\">" + 
>>"<dcr:xpath>//sv:node[@sv:name='myapp:paragraph']</dcr:xpath>"
>> + "</d:searchrequest>";
>>
>>Can someone write up a tutorial and offer examples of how to 
>>use this custom DASL searching mechanism?  I, and maybe 
>>others, would prefer <basicsearch> functionality but until 
>>then kinda need a primer on how to use this version of DASL.
>>
>>Thanky,
>>-D
>>


Mime
View raw message