[infinispan-dev] Query order question

Bryan Grunow imbng at yahoo.com
Tue Nov 24 11:01:50 EST 2009


Yes, we'll index a sort field.  We were hoping to have a "sorted index" to optimize things since we'll always want to retrieve the data in that order.

Anyhow, thanks for you answers.

Bryan


>
>From: Emmanuel Bernard <emmanuel at hibernate.org>
>To: infinispan -Dev List <infinispan-dev at lists.jboss.org>
>Sent: Tue, November 24, 2009 12:13:40 AM
>Subject: Re: [infinispan-dev] Query order question
>
>No it's not guaranteed by Lucene. It's actually guaranteed not to as Lucene order by relevance OOTB and even if it did not, Lucene reorder entries when compacting the index. So order is not guaranteed just like a regular relational database. 
>You could store a globally unique incremented number with all your objects and sort by this field, though, if you really need this feature.
>
>
>
>
>
>
>On 23 nov. 09, at 22:39, Navin Surtani wrote:
>
>
>>
>>On 23 Nov 2009, at 21:08, Manik Surtani wrote:
>>
>>
>>>
>>>On 20 Nov 2009, at 23:44, Bryan Grunow wrote:
>>>
>>>When running a local query against a FIFODataContainer I get the results back in FIFO order.  Is this guaranteed?
>>>
>>>
>>>No this is not.  For example your query may have additional ordering rules.  If you see stuff in FIFO, this is purely coincidental.
>>>
>>> If not do you think it’s possible for 4.1 when queries are officially supported?
>>>
>>>
>>>Lucene maintains the indexes and performs searching - so we would need to look at Lucene and see if it supports a default FIFO, etc ordering.  Navin/Emmanuel/Sanne - would either of you know off the top of your head?
>>
>>
>>I unfortunately don't know this off the top of my head. I'm guessing Emmanuel and/or Sanne would have a better idea.
>>
>>
>>>
>>>Cheers
>>>Manik
>>>
>>>
>>>--
>>>Manik Surtani
>>>manik at jboss.org
>>>Lead, Infinispan
>>>Lead, JBoss Cache
>>>http://www.infinispan.org/
>>>http://www.jbosscache.org/
>>>
>>>
>>>
>>>
>>>_______________________________________________
>>>infinispan-dev mailing list
>>>infinispan-dev at lists.jboss.org
>>>https://lists.jboss.org/mailman/listinfo/infinispan-dev
>>
>>Navin Surtani
>>
>>
>>Intern Infinispan
>>Intern JBoss Cache Searchable
>>_______________________________________________
>>infinispan-dev mailing list
>>infinispan-dev at lists.jboss.org
>>https://lists.jboss.org/mailman/listinfo/infinispan-dev
>


      




More information about the infinispan-dev mailing list