[hibernate-dev] HSearch: Using sharding and avoiding query on multiple shards

Emmanuel Bernard emmanuel at hibernate.org
Wed Jun 10 15:48:36 EDT 2009


On  Jun 10, 2009, at 15:22, Chase Seibert wrote:

> >That sounds like an elegant approach but we need a way to make it  
> easy to declare
> >a filter as dump/shard-sensitive only (ie not force the user to  
> write some Filter
> >implementation). With this knowledge, HSearch could ignore the dump  
> filter for
> >the actual Lucene filtering operation.
>
> I actually think it's rather elegant, because it's backwards  
> compatible. The filter will cause the correct data to return whether  
> it's executed before or after hitting the indexes. Ie, it returns  
> the correct results pre-patch.
>
> To avoid the extra over-head, would it be safe to assume that if the  
> IndexShardingStrategy returned a subset (non-zero, non-all) set of  
> DirectoryProviders for  
> getDirectoryProvidersForQuery(FullTextFilter[] filters), that it's  
> safe to ignore that filter post-search? Effectively, we can delete  
> that filter from the array in FullTextQueryImpl.

No, that would not be safe.
I'd rather get a special marker (flag or class) to specify that a  
filter should be ignored from the list post search.



More information about the hibernate-dev mailing list