List Info

Thread: Using DASL to search




Using DASL to search
country flaguser name
United States
2007-06-19 14:33:47
Hello all.

I am trying to use DASL to search for the existence (and
size) of a 
file. Following an example on the wiki 
(http:
//wiki.apache.org/jakarta-slide/DASLSearch), it seems
that a query 
like the following should find a file named like
"splash.bmp":

            String query =
                    + "<D:searchrequest xmlns
="DAV:">"
                    +     "<D:basicsearch>"
                    +         "<D:select>"
                    +            
"<D:prop>"
                    +                
"<D:getcontentlength/>"
                    +            
"</D:prop>"
                    +         "</D:select>"
                    +         "<D:from>"
                    +            
"<D:scope>"
                    +                
"<D:href></D:href>"
                    +                
"<D:depth>1</D:depth>"
                    +            
"</D:scope>"
                    +         "</D:from>"
                    +         "<D:where>"
                    +            
"<D:contains>splash</D:contains>"
                    +         "</D:where>"
                    +    
"</D:basicsearch>"
                    + "</D:searchrequest>";

Problem I am facing is that it doesn't find it (that file
does exist at 
that depth) and trying other files, it seems to me that it
is only 
including files of text/xml content type and not, say
image/bmp or other 
things. Is that a default search type? And if so, how can I
extend that 
to other/all types? If I search for, say, "plugin"
and if I have 
"plugin.xml" there, it finds it. Just as a side
note, I have all my 
files at /slide/files and I am using 2.2 built by WCK.

Thanks in advance,
Ali.



------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org


Re: Using DASL to search
country flaguser name
Germany
2007-06-19 15:22:42
Ali Naddaf wrote:
> Hello all.
> 
> I am trying to use DASL to search for the existence
(and size) of a 
> file. Following an example on the wiki 
> (http:
//wiki.apache.org/jakarta-slide/DASLSearch), it seems
that a query 
> like the following should find a file named like
"splash.bmp":
> ...

DAV:contains searches the content of the file, not for the
file name.

See <http://greenbytes.de/tech/webdav/draft-
reschke-webdav-search-12.html>.

Best regards, Julian

------------------------------------------------------------
---------
To unsubscribe, e-mail: slide-user-unsubscribejakarta.apache.org
For additional commands, e-mail: slide-user-helpjakarta.apache.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )