[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-dev
Subject:    Re: Scope Depth in BasicQueryScope / possible bug
From:       Eirikur Hrafnsson <eiki () idega ! is>
Date:       2005-06-23 11:38:41
Message-ID: C35B2FAE-6691-4BF9-8DBC-233D901C8DCC () idega ! is
[Download RAW message or body]

Brilliant! Thanks a lot : )

cheers
-Eiki, idega.

On 23.6.2005, at 09:09, Unico Hommes wrote:

> Hi Eirikur, I've changed the behavior of the depth-limit parameter so
> that a value of -1 signifies infinite depth. Sorry to hear this caused
> you so much trouble.
>
> --
> Unico
>
> Eirikur Hrafnsson wrote:
>
>> Hi,
>>
>> It seems that there is no correct value for "infinite" depth in the
>> web.xml parameter "depth-limit" for the WebdavServlet.
>> Your only option it seems is to put in a "large enough" number  (like
>> 1000) which I think is a little silly rather than just -1 for any   
>> depth...
>>
>> There is also a possible bug regarding the parameter because the   
>> value
>> "-1" will cause a NPE like so:
>> 22 Jun 2005 16:04:26 -
>> org.apache.slide.webdav.method.AbstractWebdavMethod - ERROR -
>> java.lang.NullPointerException
>> java.lang.NullPointerException
>>     at org.apache.slide.search.basic.BasicQuery.getSlidePath
>> (BasicQuery.java:189)
>>     at org.apache.slide.search.basic.BasicQueryEnvelope.getSlidePath
>> (BasicQueryEnvelope.java:404)
>>     at org.apache.slide.webdav.method.SearchMethod.parseRequest
>> (SearchMethod.java:134)
>>     at org.apache.slide.webdav.method.AbstractWebdavMethod.run
>> (AbstractWebdavMethod.java:382)
>>     at org.apache.slide.webdav.WebdavServlet.service
>> (WebdavServlet.java:151)
>>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
>>
>>
>> Personally I had been struggling with my DASL queries for days   
>> thinking
>> I was doing something terribly wrong only to find out it was  this  
>> one
>> parameter making fun of me!
>>
>> Could someone in the Slide team include this info in the Wiki/FAQ (in
>> Configuring DASL perhaps) and preferably allow the value -1...
>>
>> btw.
>> Nice to be back on the list...
>>
>> cheers
>> -Eiki
>> ------
>>
>> Eirikur S. Hrafnsson, eiki@idega.is
>> Chief Software Engineer
>> Idega Software
>> http://www.idega.com
>>
>>
>>
>> On 10.6.2005, at 14:48, Unico Hommes wrote:
>>
>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Max Pfingsthorn wrote:
>>>
>>>
>>>> Hi!
>>>>
>>>> I've gotten quite far with backporting the Lucene based DASL stuff.
>>>> However, I have one problem, which also applies to the HEAD, I  
>>>> think:
>>>> The depth of the scope. For some reason, instead of being
>>>> QueryScope.INFINITY (i.e. Interger.MAX_VALUE), it is 3 when I  
>>>> execute
>>>> a DASL like this:
>>>>
>>>> <D:searchrequest xmlns:D="DAV:"
>>>> xmlns:slide="http://jakarta.apache.org/slide/"> <D:basicsearch>
>>>> <D:select> <D:prop> <D:getcontentlength/> </D:prop> </D:select>
>>>> <D:from> <D:scope> <D:href>binaries</D:href>
>>>> <D:depth>INFINITY</D:depth> </D:scope> </D:from> <D:where>
>>>> <D:not-is-collection/> </D:where> </D:basicsearch> </ 
>>>> D:searchrequest>
>>>>
>>>>
>>>> I have no clue where this gets changed... Depths of 0 and 1 work  
>>>> just
>>>> fine. The scope depth when the BasicQueryScope is constructed is
>>>> Interger.MAX_VALUE, but when I retrieve the depth in the abstract
>>>> expression (where the execute happens) like so
>>>> "query.getScope().getDepth()", it is 3. This means that  
>>>> ultimately, I
>>>> loose all the results which are deeper than three levels below my
>>>> scope uri. Since there are only 3 allowed depths, 0,1, and  
>>>> infinity,
>>>> does the 3 actually mean infinity? If yes, why is  
>>>> QueryScope.INFINITY
>>>> set to Integer.MAX_VALUE then?
>>>>
>>>>
>>>
>>> By default Slide limits the searchdepth to 3 in order to prevent   
>>> clients
>>> from being able to put the server on too much stress when they   
>>> would do
>>> for example a propfind on the root with depth infinity. You need to
>>> configure the servlet to disable this behavior (look for max-depth
>>> parameter or something; probably -1 is equivalent to infinity).
>>>
>>> - --
>>> Unico
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.1 (Darwin)
>>>
>>> iD8DBQFCqagjcuec8tVNKAwRAmDuAJ9MptXRxhixYDTieGsaJtUoN8M3ZQCgzqkY
>>> KvSRpz8yfkf/p3jEGB7Wy4w=
>>> =pqp3
>>> -----END PGP SIGNATURE-----
>>>
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-dev-help@jakarta.apache.org
>
>
>

Best Regards

Eirikur S. Hrafnsson, eiki@idega.is
Chief Software Engineer
Idega Software
http://www.idega.com


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic