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

org.frekele.elasticsearch.mapping.annotations.ElasticCompletionField Maven / Gradle / Ivy

The newest version!
package org.frekele.elasticsearch.mapping.annotations;

import org.frekele.elasticsearch.mapping.annotations.values.BoolValue;
import org.frekele.elasticsearch.mapping.annotations.values.IntValue;
import org.frekele.elasticsearch.mapping.enums.FieldType;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * The completion suggester provides auto-complete/search-as-you-type functionality.
 * This is a navigational feature to guide users to relevant results as they are typing, improving search precision.
 * It is not meant for spell correction or did-you-mean functionality like the term or phrase suggesters.
 *
 * @author frekele - Leandro Kersting de Freitas
 * @see Site Elasticsearch Reference Guide.
 */
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface ElasticCompletionField {

    FieldType type = FieldType.COMPLETION;

    String suffixName() default "completion";

    String analyzer() default "";

    String searchAnalyzer() default "";

    BoolValue preserveSeparators() default @BoolValue(ignore = true);

    BoolValue preservePositionIncrements() default @BoolValue(ignore = true);

    IntValue maxInputLength() default @IntValue(ignore = true);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy