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

org.hibernate.search.analyzer.spi.ScopedAnalyzerReference 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.spi;

/**
 * Reference to a scoped analyzer implementation.
 *
 * @author Davide D'Alto
 *
 * @hsearch.experimental This type is under active development as part of the Elasticsearch integration. You
 * should be prepared for incompatible changes in future releases.
 */
public interface ScopedAnalyzerReference extends AnalyzerReference {

	@Override
	ScopedAnalyzer getAnalyzer();

	/**
	 * @return A builder for copying the referenced analyzer, altering some scopes as necessary.
	 */
	CopyBuilder startCopy();

	/**
	 * Interface for building a reference to a scope aware analyzer when bootstrapping.
	 *
	 * @author Guillaume Smet
	 * @author Yoann Rodiere
	 * @hsearch.experimental This type is under active development as part of the Elasticsearch integration. You
	 * should be prepared for incompatible changes in future releases.
	 */
	public interface Builder {
		AnalyzerReference getGlobalAnalyzerReference();

		void setGlobalAnalyzerReference(AnalyzerReference globalAnalyzerReference);

		void addAnalyzerReference(String scope, AnalyzerReference analyzerReference);

		ScopedAnalyzerReference build();
	}

	/**
	 * Interface for building a copy of a reference to a scope aware analyzer at runtime.
	 * 

* This is mainly used to override analyzers for some scopes. * * @author Guillaume Smet * @author Yoann Rodiere * @hsearch.experimental This type is under active development as part of the Elasticsearch integration. You * should be prepared for incompatible changes in future releases. */ public interface CopyBuilder { void addAnalyzerReference(String scope, AnalyzerReference analyzerReference); ScopedAnalyzerReference build(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy