org.hibernate.search
Class Environment

java.lang.Object
  extended by org.hibernate.search.Environment

public final class Environment
extends Object

Author:
Emmanuel Bernard, Hardy Ferentschik

Field Summary
static String ANALYZER_CLASS
          Default Lucene analyser
static String AUTOREGISTER_LISTENERS
          Enable listeners auto registration in Hibernate Annotations and EntityManager.
static String CACHE_DOCIDRESULTS_SIZE
          number of docidresults cached in hard reference.
static org.apache.lucene.util.Version DEFAULT_LUCENE_MATCH_VERSION
          If nothing else is specified we use Version.LUCENE_CURRENT as the default Lucene version.
static String DEFAULT_NULL_TOKEN
          Parameter name used to configure the default null token
static String ENABLE_DIRTY_CHECK
          When enabled reindexing of an entity is skipped if the updates affect only non-indexed fields.
static String ERROR_HANDLER
          Set to a fully qualified classname of a type implementing org.hibernate.search.exception.ErrorHandler to override the error strategy used during processing of the Lucene updates.
static String EXCLUSIVE_INDEX_USE
          When set to true a lock on the index will not be released until the SearchFactory (or SessionFactory) is closed.
static String FILTER_CACHING_STRATEGY
          filter caching strategy class (must have a no-arg constructor and implement FilterCachingStrategy)
static String GENERATE_STATS
          If set to true the search statistic will be gathered.
static String INDEX_MANAGER_IMPL_NAME
          Used to specify an alternative IndexManager implementation for a specific index.
static String INDEX_METADATA_COMPLETE
          Boolean setting, defaults to true.
static String INDEXING_STRATEGY
          Defines the indexing strategy, default event Other options manual
static String JMX_ENABLED
          If set to true JMX beans get enabled.
static String LUCENE_MATCH_VERSION
          The Lucene match version parameter.
static String MAX_QUEUE_LENGTH
          The lucene backend has a separate writing thread for each index, the work pushed to each thread is put in a queue which grows up to a maximum number of elements, which is configured by this setting and defaults to 1000.
static String MODEL_MAPPING
          Provide a programmatic mapping model to Hibernate Search configuration Accepts a fully populated SearchMapping object or a fully qualified class name of a SearchMapping factory.
static String QUEUEINGPROCESSOR_BATCHSIZE
          Defines the maximum number of indexing operation batched per transaction
static String READER_PREFIX
          define the reader prefix
static String READER_STRATEGY
          define the reader strategy used
static String RESOURCE_CHARSET
          Tokenizer or filter parameter describing the charset used to load associated resources if needed.
static String RETRY_MARKER_LOOKUP
          Number of times we retry the logic looking for marker files in master's directory before giving up and raising an exception.
static String SIMILARITY_CLASS
          Default Lucene similarity
static String SIMILARITY_CLASS_PER_INDEX
          Define the similarity class name for a given index
static String WORKER_BACKEND
           
static String WORKER_EXECUTION
           
static String WORKER_PREFIX
           
static String WORKER_SCOPE
           
static String WORKER_THREADPOOL_SIZE
          Thread pool size default 1
static String WORKER_WORKQUEUE_SIZE
          Size of the buffer queue (besides the thread pool size) only used then execution is async default infinite
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUTOREGISTER_LISTENERS

public static final String AUTOREGISTER_LISTENERS
Enable listeners auto registration in Hibernate Annotations and EntityManager. Default to true.

See Also:
Constant Field Values

INDEXING_STRATEGY

public static final String INDEXING_STRATEGY
Defines the indexing strategy, default event Other options manual

See Also:
Constant Field Values

ANALYZER_CLASS

public static final String ANALYZER_CLASS
Default Lucene analyser

See Also:
Constant Field Values

SIMILARITY_CLASS

public static final String SIMILARITY_CLASS
Default Lucene similarity

See Also:
Constant Field Values

WORKER_SCOPE

public static final String WORKER_SCOPE
See Also:
Constant Field Values

WORKER_PREFIX

public static final String WORKER_PREFIX
See Also:
Constant Field Values

WORKER_BACKEND

public static final String WORKER_BACKEND
See Also:
Constant Field Values

WORKER_EXECUTION

public static final String WORKER_EXECUTION
See Also:
Constant Field Values

QUEUEINGPROCESSOR_BATCHSIZE

public static final String QUEUEINGPROCESSOR_BATCHSIZE
Defines the maximum number of indexing operation batched per transaction

See Also:
Constant Field Values

WORKER_THREADPOOL_SIZE

public static final String WORKER_THREADPOOL_SIZE
Thread pool size default 1

See Also:
Constant Field Values

WORKER_WORKQUEUE_SIZE

public static final String WORKER_WORKQUEUE_SIZE
Size of the buffer queue (besides the thread pool size)

See Also:
Constant Field Values

READER_PREFIX

public static final String READER_PREFIX
define the reader prefix

See Also:
Constant Field Values

READER_STRATEGY

public static final String READER_STRATEGY
define the reader strategy used

See Also:
Constant Field Values

FILTER_CACHING_STRATEGY

public static final String FILTER_CACHING_STRATEGY
filter caching strategy class (must have a no-arg constructor and implement FilterCachingStrategy)

See Also:
Constant Field Values

CACHE_DOCIDRESULTS_SIZE

public static final String CACHE_DOCIDRESULTS_SIZE
number of docidresults cached in hard reference.

See Also:
Constant Field Values

EXCLUSIVE_INDEX_USE

public static final String EXCLUSIVE_INDEX_USE
When set to true a lock on the index will not be released until the SearchFactory (or SessionFactory) is closed. This improves performance in applying changes to the index, but no other application can access the index in write mode while Hibernate Search is running. This is an index-scoped property and defaults to false.

See Also:
Constant Field Values

INDEX_METADATA_COMPLETE

public static final String INDEX_METADATA_COMPLETE
Boolean setting, defaults to true. Unless it's disabled Hibernate Search will assume it knows all entities mapped to this index and will enable all optimizations which are considered safe in the known schema. For example it will delete indexed entities from the index using only the identifier if there is only one type in the index; when multiple types share the same index or this option is disabled it will need to delete entities using both the id and the classname.

See Also:
Constant Field Values

RETRY_MARKER_LOOKUP

public static final String RETRY_MARKER_LOOKUP
Number of times we retry the logic looking for marker files in master's directory before giving up and raising an exception. This setting is the suffix of an index using FSSlaveDirectoryProvider Note that we try again after 5 seconds. Default to 0 (ie no retry).

See Also:
Constant Field Values

SIMILARITY_CLASS_PER_INDEX

public static final String SIMILARITY_CLASS_PER_INDEX
Define the similarity class name for a given index

See Also:
Constant Field Values

MODEL_MAPPING

public static final String MODEL_MAPPING
Provide a programmatic mapping model to Hibernate Search configuration Accepts a fully populated SearchMapping object or a fully qualified class name of a SearchMapping factory. Such a factory must have: - a no-arg constructor - a method returning SearchMapping and annotated with @Factory

See Also:
Constant Field Values

ERROR_HANDLER

public static final String ERROR_HANDLER
Set to a fully qualified classname of a type implementing org.hibernate.search.exception.ErrorHandler to override the error strategy used during processing of the Lucene updates. Default is to log errors.

See Also:
Constant Field Values

JMX_ENABLED

public static final String JMX_ENABLED
If set to true JMX beans get enabled. For all other values the beans do not. get enabled.

See Also:
Constant Field Values

GENERATE_STATS

public static final String GENERATE_STATS
If set to true the search statistic will be gathered.

See Also:
Constant Field Values

LUCENE_MATCH_VERSION

public static final String LUCENE_MATCH_VERSION
The Lucene match version parameter. Needed since Lucene 3.x

See Also:
Constant Field Values

DEFAULT_NULL_TOKEN

public static final String DEFAULT_NULL_TOKEN
Parameter name used to configure the default null token

See Also:
Constant Field Values

RESOURCE_CHARSET

public static final String RESOURCE_CHARSET
Tokenizer or filter parameter describing the charset used to load associated resources if needed.

See Also:
Constant Field Values

ENABLE_DIRTY_CHECK

public static final String ENABLE_DIRTY_CHECK
When enabled reindexing of an entity is skipped if the updates affect only non-indexed fields. Enabled by default as it should be safe and should improve performance, disable it to force updates skipping value checks. Affect semantics of entity updates only.

See Also:
Constant Field Values

MAX_QUEUE_LENGTH

public static final String MAX_QUEUE_LENGTH
The lucene backend has a separate writing thread for each index, the work pushed to each thread is put in a queue which grows up to a maximum number of elements, which is configured by this setting and defaults to 1000. When the limit is reached work producers are blocked until some work has been processed.

See Also:
Constant Field Values

DEFAULT_LUCENE_MATCH_VERSION

public static final org.apache.lucene.util.Version DEFAULT_LUCENE_MATCH_VERSION
If nothing else is specified we use Version.LUCENE_CURRENT as the default Lucene version. This version parameter was introduced by Lucene to attempt providing backwards compatibility when upgrading Lucene versions and not wanting to rebuild the index from scratch. It's highly recommended to specify a version, so that you can upgrade Hibernate Search and control when to eventually upgrade the Lucene format.


INDEX_MANAGER_IMPL_NAME

public static final String INDEX_MANAGER_IMPL_NAME
Used to specify an alternative IndexManager implementation for a specific index. This is an index scoped property, so it needs to be prefixed by default or the index name, for example:

See Also:
Constant Field Values


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved