-->
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.  [ 2 posts ] 
Author Message
 Post subject: Query to Return All Indexed Entities
PostPosted: Mon Apr 26, 2010 9:54 am 
Newbie

Joined: Wed Feb 10, 2010 5:07 am
Posts: 11
Hey,

I want to return all indexed entities for a given indexed class. I can't see in the docu or online how to do this, I've tried a regular FullTextQuery with no query attached and it returns nothing.

Can anyone help?

Thanks,

Steve


Top
 Profile  
 
 Post subject: Re: Query to Return All Indexed Entities
PostPosted: Mon Apr 26, 2010 11:28 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
there's an appropriate Lucene query that matches all Lucene documents; you could contrain it to some types or leave the types unspecified to retrieve all indexed types:

Code:
fullTextSession.createFullTextQuery( new MatchAllDocsQuery() );

or
Code:
fullTextSession.createFullTextQuery( new MatchAllDocsQuery(), Type1.class, Type2.class );

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.