You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Kiran Ayyagari <ka...@apache.org> on 2010/07/08 09:15:18 UTC

[Client-API] adding a new method to SearchCursor

hi guys,

    The SearchCursor which we use to get the search results lacks a
way to return the SearchResultDone message.
    Seelmann pointed this out on IRC today and I have proposed that
will add a new method getSearchDone() to the SearchCursor.

    This method can be called at the end of cursor traversal (after
cursor.next() returns false) to get the SearchResultDone message.

Kiran Ayyagari

Re: [Client-API] adding a new method to SearchCursor

Posted by Kiran Ayyagari <ka...@apache.org>.
On Thu, Jul 8, 2010 at 1:10 PM, Emmanuel Lecharny <el...@gmail.com> wrote:
>  On 7/8/10 9:15 AM, Kiran Ayyagari wrote:
>>
>> hi guys,
>>
>>     The SearchCursor which we use to get the search results lacks a
>> way to return the SearchResultDone message.
>>     Seelmann pointed this out on IRC today and I have proposed that
>> will add a new method getSearchDone() to the SearchCursor.
>>
>>     This method can be called at the end of cursor traversal (after
>> cursor.next() returns false) to get the SearchResultDone message.
>
> Just wondering : if you want to get the SearchResultDone after the last call
> to cursor.next(), that means you don't return this SearchResultDone in
> cursor.next() ?
right, SearchResultDone is not returned with cursor.next(), the reason
is to avoid
an instanceof check in the while(cursor.next()) loop.

(in case of SearchResultReference or SearchIntermediateResponse the
user has to cast
anyway but atleast in the case of SearchResultDone it can be avoided
cause it will always
come last)

Kiran Ayyagari

Re: [Client-API] adding a new method to SearchCursor

Posted by Emmanuel Lecharny <el...@gmail.com>.
  On 7/8/10 9:15 AM, Kiran Ayyagari wrote:
> hi guys,
>
>      The SearchCursor which we use to get the search results lacks a
> way to return the SearchResultDone message.
>      Seelmann pointed this out on IRC today and I have proposed that
> will add a new method getSearchDone() to the SearchCursor.
>
>      This method can be called at the end of cursor traversal (after
> cursor.next() returns false) to get the SearchResultDone message.

Just wondering : if you want to get the SearchResultDone after the last 
call to cursor.next(), that means you don't return this SearchResultDone 
in cursor.next() ?

I think it makes some, somehow.

-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com


Re: [Client-API] adding a new method to SearchCursor

Posted by Pierre-Arnaud Marcelot <pa...@marcelot.net>.
+1

That's a very good idea and very well implemented, in the sense that it would not be exposed a "real" search result (get from the nextto the casual user of API, but can be easily accessed by the "expert" user of the API.

I really like the idea.

Regards,
Pierre-Arnaud

On 8 juil. 2010, at 09:15, Kiran Ayyagari wrote:

> hi guys,
> 
>    The SearchCursor which we use to get the search results lacks a
> way to return the SearchResultDone message.
>    Seelmann pointed this out on IRC today and I have proposed that
> will add a new method getSearchDone() to the SearchCursor.
> 
>    This method can be called at the end of cursor traversal (after
> cursor.next() returns false) to get the SearchResultDone message.
> 
> Kiran Ayyagari