All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.search.analyzer.definition.impl.LuceneAnalysisDefinitionRegistry Maven / Gradle / Ivy

There is a newer version: 5.11.12.Final
Show newest version
/*
 * Hibernate Search, full-text search for your domain model
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.search.analyzer.definition.impl;

import org.hibernate.search.annotations.AnalyzerDef;
import org.hibernate.search.annotations.NormalizerDef;
import org.hibernate.search.exception.SearchException;

/**
 * A registry of analysis-related definitions for Lucene.
 *
 * @author Yoann Rodiere
 */
public interface LuceneAnalysisDefinitionRegistry {

	/**
	 * Register an analyzer definition.
	 * @param name The name of the definition to be registered.
	 * @param definition The definition to be registered.
	 * @throws SearchException if the name is already associated with a different definition.
	 */
	void register(String name, AnalyzerDef definition);

	/**
	 * Register a normalizer definition.
	 * @param name The name of the definition to be registered.
	 * @param definition The definition to be registered.
	 * @throws SearchException if the name is already associated with a different definition.
	 */
	void register(String name, NormalizerDef definition);

	/**
	 * @param name An analyzer name
	 * @return The analyzer definition associated with the given name,
	 * or {@code null} if there isn't any.
	 */
	AnalyzerDef getAnalyzerDefinition(String name);

	/**
	 * @param name A normalizer name
	 * @return The normalizer definition associated with the given name,
	 * or {@code null} if there isn't any.
	 */
	NormalizerDef getNormalizerDefinition(String name);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy