>You give up any hope of implementing sorting (explicit or using relevance).<br><br>I think if we allways block iterator.next() until we have at least a value of each node , we can apply sort in this values (since every node already made this). That's what you said, Navin?<br>
<br><div class="gmail_quote">On Wed, Sep 15, 2010 at 8:16 AM, Navin Surtani <span dir="ltr"><<a href="mailto:nsurtani@redhat.com">nsurtani@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Isn't that an issue that comes with lots of hits in a lazyIterator anyway?<br>
<br>
I mean, if you're only going to load up a 'few hits at a time' then you<br>
can in theory only sort the few hits that you have loaded up anyway<br>
right? :S<br>
<div><div></div><div class="h5"><br>
On 15/09/10 12:01, Emmanuel Bernard wrote:<br>
> You give up any hope of implementing sorting (explicit or using relevance).<br>
><br>
> On 15 sept. 2010, at 12:16, Manik Surtani wrote:<br>
><br>
>> How about something like:<br>
>><br>
>> - Broadcast the query<br>
>> - Every node creates the QueryHits inst, runs the query and collects<br>
>> results. Starts streaming the results back immediately.<br>
>> - The lazy iterator returns to the user immediately, and maintains an<br>
>> internal cache of results coming in from N remote QueryHits instances<br>
>> - iterator.next() blocks until this cache has available entries to return.<br>
>> - on an implementation level, the GetHItsCommand (or something like<br>
>> that) could return with a single hit, or N hits, with a flag of<br>
>> whether more hits are available or not.<br>
>><br>
>> Does that help?<br>
>><br>
>> Manik<br>
>><br>
>><br>
>> On 14 Sep 2010, at 20:46, Israel Lacerra wrote:<br>
>><br>
>>> Hi guys,<br>
>>><br>
>>> I'm still thinking about it, but I don't have a really good idea<br>
>>> about the lazy iterator yet. The only way (that I see) I could make<br>
>>> it more lazily is:<br>
>>><br>
>>> - Broadcast the query.<br>
>>> - Every node creates a QueryHits instance with the query and keep it<br>
>>> in a simple little cache (array, hash, etc)<br>
>>> - A "state" of the query is created and every lazyIterator.next()<br>
>>> must send a command to a node and get the next hit (the next key).<br>
>>> - After a certain time, the instances of queryHits "dies".<br>
>>><br>
>>> It seems to me that this is not too efficient. But I don't have any<br>
>>> other ideas.<br>
>>><br>
>>> Do you have any suggestions about it?<br>
>>><br>
>>> thanks!<br>
>>> Israel<br>
>>><br>
<br>
<br>
</div></div>--<br>
<div><div></div><div class="h5">Navin Surtani<br>
Intern Infinispan<br>
_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org">infinispan-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/infinispan-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/infinispan-dev</a><br>
</div></div></blockquote></div><br>