To make a LazyIterator for ISPN-200 (<a href="https://issues.jboss.org/browse/ISPN-200">https://issues.jboss.org/browse/ISPN-200</a>) I was starting a query in each node and then merging the results (TopDocs) in the requester node...<br>
<br><div class="gmail_quote">On Sun, Apr 10, 2011 at 6:10 AM, Emmanuel Bernard <span dir="ltr"><<a href="mailto:emmanuel@hibernate.org">emmanuel@hibernate.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">Why do you need TopDocs? What's the use case?<div><div></div><div class="h5"><div><br><div><div>On 10 avr. 2011, at 03:42, Israel Lacerra wrote:</div><br><blockquote type="cite">Guys,<br>
<br>Do you think we can have a getQueryHits() on HSQueryImpl? To do ISPN-200 I was using the TopDocs and now, with Infinispan using HSQueryImpl, TopDocs is a little more hided....<br><br>Anyway, take this just as a "suggestion". I can get the TopDocs in another less fashion way :).<br>
<br>cheers<br><br>Israel<br><br><div class="gmail_quote">On Tue, Apr 5, 2011 at 9:23 AM, Emmanuel Bernard <span dir="ltr"><<a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div></div><div><br>
On 5 avr. 2011, at 13:38, Sanne Grinovero wrote:<br>
<br>
> 2011/4/5 Emmanuel Bernard <<a href="mailto:emmanuel@hibernate.org" target="_blank">emmanuel@hibernate.org</a>>:<br>
>><br>
>> On 5 avr. 2011, at 12:20, Galder Zamarreño wrote:<br>
>><br>
>>><br>
>>> On Apr 4, 2011, at 6:23 PM, Sanne Grinovero wrote:<br>
>>><br>
>>>> </snip><br>
>>>><br>
>>>> there's one catch:<br>
>>>> when searching for a class type, it will only include results from<br>
>>>> known subtypes. The targeted type is automatically added to the known<br>
>>>> classes, but eventually existing subtypes are not discovered.<br>
>>>><br>
>>>> Bringing this issue to an extreme, if the query is not targeting any<br>
>>>> type, and no indexed types where added to the grid (even if some exist<br>
>>>> already as they might have been inserted by other JVMs or previous<br>
>>>> runs), all queries will return no results.<br>
>>>> How to solve this?<br>
>>>> - class scanning?<br>
>>><br>
>>> Nope, too expensive.<br>
>>><br>
>>>> - explicitly list indexed entities in Infinispan configuration?<br>
>>><br>
>>> No<br>
>>><br>
>>>> - a metadata cache maintaining a distributed&stored copy of known types<br>
>>><br>
>>> That sounds more appealing. It could be a good middle ground until Search can search for types.<br>
>><br>
>> Do you have any specific idea in mind?<br>
>><br>
>> To magically find types:<br>
>> - we scan every file system, databases, caches available to the app and look for Lucene metadata => unrealistic<br>
>> - there is some kind of convention on where the indexes are and we do index scanning at startup => scanning are very likely to be slower that class scanning (potential remote access, bigger dataset etc)<br>
>> - we enforce one or a fixed number of Lucene indexes for all data in Infinispan => not sure that's a good idea but this can be explored<br>
>> - we somehow ask the framework using HSearch to fill up classes<br>
>><br>
>> other approaches?<br>
><br>
> why was class scanning discarded in the first answer? as H. Search can<br>
> auto-discover classes by working on top of JPA entity autodiscovery, I<br>
> guess that each application node could look into it's own known<br>
> classpath.<br>
> After all if some type is not visible to him as it was added from<br>
> another node from a different app, he won't be able to return<br>
> instances of it either.<br>
> We could face the opposite problem of building metadata of classes<br>
> people doesn't mean to index in this cache.<br>
<br>
</div></div>Right. scanning (class or index) will be a bit aggressive and could build unneeded metadata (or even worse, return unexpected classes).<br>
<div><div></div><div>_______________________________________________<br>
infinispan-dev mailing list<br>
<a href="mailto:infinispan-dev@lists.jboss.org" target="_blank">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>
</blockquote></div><br></div></div></div></div></blockquote></div><br>