org.hibernate.search.elasticsearch.analyzer.ElasticsearchTokenizerFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hibernate-search-elasticsearch Show documentation
Show all versions of hibernate-search-elasticsearch Show documentation
Hibernate Search backend which has indexing operations forwarded to Elasticsearch
/*
* 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.elasticsearch.analyzer;
import org.apache.lucene.analysis.util.TokenizerFactory;
import org.hibernate.search.annotations.AnalyzerDef;
/**
* A token filter factory to use with {@link AnalyzerDef} annotations
* to define an Elasticsearch tokenizer.
*
* Caution: parameter values are interpreted as JSON, though using lenient parsing
* (quotes around strings may be left out in some cases, as when a string only contains letters).
*
* Example:
*
* {@literal @}TokenizerDef(
* name = "custom-edgeNGram",
* factory = ElasticsearchTokenizerFactory.class,
* params = {
* {@literal @}Parameter(name = "type", value = "edgeNGram"),
* {@literal @}Parameter(name = "min_gram", value = "1"),
* {@literal @}Parameter(name = "max_gram", value = "10")
* }
* )
*
*
* @author Yoann Rodiere
*/
public abstract class ElasticsearchTokenizerFactory extends TokenizerFactory {
private ElasticsearchTokenizerFactory() {
super( null );
// Do not instantiate this type.
}
}