-->
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.  [ 5 posts ] 
Author Message
 Post subject: FullTextQuery projections and filtered types
PostPosted: Sun Jun 12, 2011 4:07 am 
Newbie

Joined: Fri Jan 18, 2008 2:32 pm
Posts: 8
Hi,

As I understand, the filtered types array that is the parameter or FullTextEntityManager.createFullTextQuery() has use only when projection is not used, am I right? If that is the case, I suggest removing the filtered type parameter from the documentation examples 5.9 and 5.10. Otherwise I would like to understand how I'm wrong.

Thanks,

Gabriel

_________________
Gabriel Axel
http://www.gabiaxel.com/


Top
 Profile  
 
 Post subject: Re: FullTextQuery projections and filtered types
PostPosted: Sun Jun 12, 2011 7:27 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Gabriel,
no filtered types should work fine even with projections. I assume you've tried it and have an issue with it? Can you show a non working example?

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


Top
 Profile  
 
 Post subject: Re: FullTextQuery projections and filtered types
PostPosted: Mon Jun 13, 2011 2:21 am 
Newbie

Joined: Fri Jan 18, 2008 2:32 pm
Posts: 8
I don't experience any problems when not using filter type with projections, I just wanted to make sure I'm not missing anything and that there is no performance loss for this case.

From my understanding, the filter type is used only for the Hibernate query that is executed after the Lucene query, and when projections are used there is no subsequent Hibernate query, so in these cases the defined filter types don't matter, is that correct?

Thanks.

_________________
Gabriel Axel
http://www.gabiaxel.com/


Top
 Profile  
 
 Post subject: Re: FullTextQuery projections and filtered types
PostPosted: Mon Jun 13, 2011 4:12 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
no actually the filter types have nothing to do with the hibernate query eventually performed afterwards when not using projections.

It's being used to restrict which Lucene Documents are eligible to match your query; you might not notice it being applied as some properties you're requiring in your query might be only matched by specific types, but it might still be useful in case of inheritance.

In case you have multiple entities in multiple indexes, restricting the type is performance wise more efficient, as it will perform the query only the needed indexes, instead of searching all indexes for potential matches.

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


Top
 Profile  
 
 Post subject: Re: FullTextQuery projections and filtered types
PostPosted: Mon Jun 13, 2011 4:22 am 
Newbie

Joined: Fri Jan 18, 2008 2:32 pm
Posts: 8
Thanks for the explanation. So I will keep the filtered type.

_________________
Gabriel Axel
http://www.gabiaxel.com/


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