-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: [Hibernate Search] Returning all entities in the index
PostPosted: Mon Sep 07, 2009 12:10 pm 
Newbie

Joined: Fri Oct 10, 2008 9:17 am
Posts: 13
Greetings,

There is something very simple we wish to achieve but we're finding it a bit difficult to find any information on how to do so, but we're sure it's possible.

Basically we want to be able to return all entities in the index. If we pass an empty say, BooleanQuery, or empty WildcardQuery, we get zero results.

Any pointers on how we can do this?


Top
 Profile  
 
 Post subject: Re: [Hibernate Search] Returning all entities in the index
PostPosted: Mon Sep 07, 2009 12:39 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

Lucene contains a MatchAllDocsQuery. This should do the trick. Otherwise you could index a constant field/value for each entity and query for this value.
I am not sure what you usecase is, but be aware of memory usage. I don't recommend to load all entities in one go. That will not scale for large indexes.

--Hardy


Top
 Profile  
 
 Post subject: Re: [Hibernate Search] Returning all entities in the index
PostPosted: Mon Sep 07, 2009 3:06 pm 
Newbie

Joined: Fri Oct 10, 2008 9:17 am
Posts: 13
Thanks Hardy - this is exactly what we need.

We don't want to load all entities per se, we'll allow the user to page through the results.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.