-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate Search: Manually trigger Slave directory provider
PostPosted: Mon Aug 08, 2011 7:25 am 
Newbie

Joined: Mon Aug 08, 2011 7:20 am
Posts: 2
Hi everybody,

is it possible to manually trigger the slave directory provider to copy the index from the master node? Or do I have to write my own directory provider for that?
We would like to flush a bunch of page caches when the index was copied, so either we trigger the refresh manually or we (if it's possible) we hook on an event.

Thx in advance


Top
 Profile  
 
 Post subject: Re: Hibernate Search: Manually trigger Slave directory provider
PostPosted: Mon Aug 08, 2011 6:07 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
hi,
no such an event is not user-controllable, I guess the easiest thing you could do is extend the directory provider.

Quote:
We would like to flush a bunch of page caches

What is it exactly that you mean with that? Maybe there's a different way to solve your problem, or I would like to know more about it.

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


Top
 Profile  
 
 Post subject: Re: Hibernate Search: Manually trigger Slave directory provider
PostPosted: Tue Aug 09, 2011 11:44 am 
Newbie

Joined: Mon Aug 08, 2011 7:20 am
Posts: 2
Hi,
we implemented a way to generate search facets by caching bitsets for every brand/category/color etc. During a search request we intercept the bit set of the search result with the bitsets of the facets.
Our system updates the master search index whenever the availabilities of products change. When the slaves then copy the index, the bitset caches and page fragment caches should be flushed, otherwise the interception generates wrong facets.

Is that in any way comprehensible?

Thx


Top
 Profile  
 
 Post subject: Re: Hibernate Search: Manually trigger Slave directory provider
PostPosted: Tue Aug 09, 2011 11:52 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
ah, nice idea.

So you have two options:
1) extend the basic implementation

2) write your bitsets as a filter, and enable caching on it.
Filters have a "bitset-like" API and the cache is bound to the IndexReader not changing: if there's an index update they will be invalidated, if not you'll end up reusing the same bitset.

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