-->
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: How does hibernate search finds the target directory?
PostPosted: Fri Jun 28, 2013 9:56 am 
Newbie

Joined: Sun May 19, 2013 2:44 pm
Posts: 10
I have multiple entities indexed. Hibernate search created multiple folders for each entity underneath the base directory. When searching for an index how does Hibernate search know which directory to search the index in? Or will it search in all the folders?


Top
 Profile  
 
 Post subject: Re: How does hibernate search finds the target directory?
PostPosted: Wed Jul 10, 2013 10:41 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
it depends on the type you're targeting for the Search.

The method:
http://docs.jboss.org/hibernate/search/4.3/api/org/hibernate/search/FullTextSession.html#createFullTextQuery(org.apache.lucene.search.Query, java.lang.Class...)

takes optional types. If you specify the type, it will be able to narrow down the set of indexes it needs to "look into".

A similar strategy happens when you specify filters, with some filters it can further narrow down the set of indexes or even the set of shards being uncluded in the search.
http://docs.jboss.org/hibernate/search/4.3/reference/en-US/html_single/#query-filter-shard

With such a custom filter you can also take control of the selection logic, in case you have additional hints.

_________________
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.