org.infinispan.query
Interface SearchManager


public interface SearchManager

The SearchManager is the entry point to create full text queries on top of a cache.

Author:
Sanne Grinovero (C) 2011 Red Hat Inc., Marko Luksa

Method Summary
 org.hibernate.search.query.dsl.EntityContext buildQueryBuilderForClass(Class<?> entityType)
          Experimental.
 CacheQuery getClusteredQuery(org.apache.lucene.search.Query luceneQuery, Class<?>... classes)
          Experimental! Use it to try out the newly introduced distributed queries.
 CacheQuery getQuery(org.apache.lucene.search.Query luceneQuery, Class<?>... classes)
          This is a simple method that will just return a CacheQuery, filtered according to a set of classes passed in.
 org.hibernate.search.SearchFactory getSearchFactory()
          Experimental.
 void registerKeyTransformer(Class<?> keyClass, Class<? extends Transformer> transformerClass)
          Registers a Transformer for the supplied key class.
 

Method Detail

getQuery

CacheQuery getQuery(org.apache.lucene.search.Query luceneQuery,
                    Class<?>... classes)
This is a simple method that will just return a CacheQuery, filtered according to a set of classes passed in. If no classes are passed in, it is assumed that no type filtering is performed and so all known types will be searched.

Parameters:
luceneQuery - - Query
classes - - optionally only return results of type that matches this list of acceptable types
Returns:
the CacheQuery object which can be used to iterate through results

buildQueryBuilderForClass

org.hibernate.search.query.dsl.EntityContext buildQueryBuilderForClass(Class<?> entityType)
Experimental. Provides Hibernate Search DSL to build full text queries

Returns:

getSearchFactory

org.hibernate.search.SearchFactory getSearchFactory()
Experimental. Access the SearchFactory


getClusteredQuery

CacheQuery getClusteredQuery(org.apache.lucene.search.Query luceneQuery,
                             Class<?>... classes)
Experimental! Use it to try out the newly introduced distributed queries.

Parameters:
luceneQuery -
classes -
Returns:

registerKeyTransformer

void registerKeyTransformer(Class<?> keyClass,
                            Class<? extends Transformer> transformerClass)
Registers a Transformer for the supplied key class. When storing keys in cache that are neither simple (String, int, ...) nor annotated with @Transformable, Infinispan-Query will need to know what Transformer to use when transforming the keys to Strings. Clients must specify what Transformer to use for a particular key class by registering it through this method.

Parameters:
keyClass - the key class for which the supplied transformerClass should be used
transformerClass - the transformer class to use for the supplied key class

-->

Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.